Commit graph

5 commits

Author SHA1 Message Date
Uwe Brauer f66183a5fe Add GPLvs3+ header to all files in tests directory 2023-07-25 18:44:32 +02:00
Eric Ludlam 67eb90e872 matlab-scan.el:
(matlab-line-declaration-p): Fix doc.
(matlab-line-first-word-text): New.

matlab.el:
(matlab-defun-regex): DELETED.
(matlab-guess-script-type): Replace use of matlab-defun-regex
with new api style navigation.
(matlab-guess-function-indentation): New way to guess
if a file should have indentation in function body.
(matlab-really-gaudy-font-lock-keywords): for tranpose,
use builtin-face like other operators.
(matlab-mode): When matlab-indent-function-body is 'guess
use new function above.
(matlab-find-prev-code-line, matlab-find-prev-line)
(matlab-prev-line, matlab-valid-end-construct-p): DELETED.
(matlab-mode-vf-block-matches-backward): DELETED

mlint.el:
(mlint-fix-entry): Use new api instead of
matlab-find-prev-code-line.

tests/metest.el:
In end detect test, turn `matlab-indent-function-body' to 'guess.
In test, also validate what the indent value is.
Put value for indent-function-body back to mw standard when done.

tests/empty.m, tests/mclass.m, tests/mfuncends.m
tests/mfuncnoends.m, tests/mfuncnoendblock.m:
Add indent exptect value to file

tests/mfuncnoendindent.m:
New file for testing endless function that should be indented.
2021-03-26 21:05:11 -04:00
Eric Ludlam 6fe7da0a62 tests/metest.el
(metest-all-syntax-tests): Force files used for intenting to be
pre-spaced incorrectly.
(metest-condition-case-error-msg): Fix how caught errors are thrown.
(met-indents-files): Add mfuncnoendblock.m
(metest-indents-randomize-files): New
Not really random.
(metest-error): Add a buffer excerpt before throwing an error.

tests/indents.m, tests/mfuncends:
Added more indent tests.
tests/mfuncnoendblock.m:
Add more content.
Enable for use in indentation test.
2021-03-14 19:28:48 -04:00
Eric Ludlam b450fe1685 matlab.el:
(matlab-ltype-comm): Make robust to block comment start,
where bounds returns false when on start.  Need to also check
for the start of a block comment.
(matlab--maybe-yes-or-no-p): New
(matlab-calcuate-indentation-1):
Use above instead of yes-or-no-p.

metest.el:
(met-end-detect-files): Add mfuncnoendblock.m
mfuncends.m:
Fix expected indentation numbers for continued arrays.
mfuncnoendblock.m:
New.
2021-03-08 08:09:06 -05:00
Eric Ludlam 134800317a matlab.el:
(matlab-lattr-block-close): After narrowing buffer,
got to eol, not max - as we had to expand the narrowed region
to handle special syntax chars on eol.

metest.el:
(metest-all-syntax-tests): Add ...
(metest-end-detect-test): New test
(met-end-dect-files): New Var
(metest-comment-string-syntax-test)
(metest-sexp-counting-test, metest-sexp-traversal-test)
(metest-indents-test, metest-parse-test):
Use new `metest-find-file' for loading in files.
(met-indents-files): Add mfuncends.m

tests/empty.m:
tests/mfuncends.m:
tests/mfuncnoend.m:
New test files

tests/stringtest.m:
tests/mclass.m:
Add end-detect expected value cookies.
2021-03-07 10:56:52 -05:00