Commit graph

57 commits

Author SHA1 Message Date
Eric Ludlam
8294034489 matlab.el (matlab-lattr-cont):
Improve regexp matching ellipsis and check for if it is in a string.
tests/indents.m:
Add test for ellipsis in a string by itself.
2020-05-15 01:23:26 -04:00
Eric Ludlam
fea089e220 matlab.el:
(matlab-block-comment-start-re, matlab-block-comment-end-re):
New regular expressions used to find the start/end of a block comment.
(matlab-ltype-block-comment-start, matlab-ltype-block-comment-end):
New predicates to check for block comment features.
(matlab-find-block-comments, matlab-ltype-block-comm-1):
Use new block comment expressions instead of hand-written regexps.
(matlab-ltype-block-comm-at-start, matlab-ltype-block-comm-at-end)
(matlab-electric-block-comment):
Use new block comment predicates.

indents.m:
Add some block comment indentation tests with valid and invalid block
comment starts.
2020-04-22 18:00:00 -04:00
Eric Ludlam
9eee3937ba matlab.el:
(matlab-keyword-list): Add `arguments' to list.
(matlab-class-font-lock-keywords): Add 'arguments' to regex where 'properties' are.
(matlab-mcos-regexp): Add `arguments' to expression.

tests/indents.el:
Add sample arguments block with indentation checks.
2020-02-24 10:42:10 -05:00
Eric Ludlam
dd121bcd84 matlab.el:
(matlab-indent-past-arg1-functions): Add 'notify'
mclass.m:
Add a call to 'notify' to test font locking and indent.
2020-02-11 16:17:47 -05:00
Eric Ludlam
10a0491f59 matlab.el:
(matlab-keyword-list, matlab-class-font-lock-keywords)
(matlab-mcos-regexp): Add 'events' keyword to be
supported the way 'properties' keyword is.
tests/mclass.m:
Add 'events' block with 2 events in it.
2020-02-10 15:58:35 -05:00
Eric Ludlam
5bfaf2dbb4 tests/mstest.el:
Add additional debugging tests, including for breakpoints buffer, and stack display.
(mstest-debugger): Add extra debugging testss.
(mstest-debugger-stacklist, mstest-debugger-breakpointlist):
New test helpers.
(mstest-debugger-breakpoint): Allow to test for multiple breakpoints by
looping over extended inputs list.
2019-12-21 18:04:05 -05:00
Eric Ludlam
968f46fbd2 tests/testeeval.m:
Add new case for 'noend' - where no </EMACSCAP> is sent.
Lets you test C-c C-c binding, to make sure there is an escape hatch.
2019-12-20 22:22:20 -05:00
Eric Ludlam
db56941251 tests/mstest.el:
(mstest-capture): Accomodate new name for Help buffer.
2019-12-20 21:28:10 -05:00
Eric Ludlam
8ac3cbf73b tests/metest.el:
(metest-comment-string-syntax-test):
Add block comment testing.
(met-sexptest-files): Remove indents.m, it had
not test points for sexp tests.

tests/stringtest.m:
Add a block comment and tests for detecting contents.
2019-12-17 17:57:56 -05:00
Eric Ludlam
42ae40f8e8 tests/indents.m:
Added tests to verify the above.
2019-12-14 19:45:50 -05:00
Eric Ludlam
3330f03f3d tests/testeeval.m:
Add 'buffer' option which tests a long wait while outputting,
and that we successfully don't show the content until it finishes.
2019-12-14 18:46:54 -05:00
Eric Ludlam
fe496763f3 Project.ede, Makefile:
Bring the tests directory into EDE.

mestest.el, mstest.el:
Fix byte compiler warnings.
2019-12-14 10:08:28 -05:00
Eric Ludlam
2e8905b59d matlab-shell.el:
(matlab-shell-scan-for-error): Some errors might
be indented, so don't underline the spaces in front.

tests/buggy.m:
Add example indented error.
2019-12-13 09:01:59 -05:00
Eric Ludlam
30bbf55ef5 tests/dbtester.m
Add a deeper set of local functions to test stack reporting.
2019-12-08 22:04:45 -05:00
Eric Ludlam
9bca22a465 matlab-compat.el:
New compat macros for cl-defmethod, pulse, and font-lock stuff.

linemark.el, mlint.el, matlab-shell-gud.el, semanticdb-matlab.el:
Replace defmethod with cl-defmethod.
Replace call-next-method with cl-call-next-method.

linemark.el:
Also require matlab-compat.el

tests/Makefile:
Allow EMACS to be overridable
2019-12-08 13:08:43 -05:00
Eric Ludlam
73dff40bfa tests/indents.el
Added more block comment patterns.
2019-12-07 10:24:31 -05:00
Eric Ludlam
1e6a2bbd38 indents.m:
Add wide range of additional tests.
This should have a mostly complete set of features
from matlab.el's indentation engine now.
2019-12-06 22:58:34 -05:00
Eric Ludlam
bff6d627fd tests/mstest.el:
Add tests for <EMACSCAP> tokens.
(mstest-run-all-tests): Add mstest-capture.
(mstest-completion): Fix expected value now that 'emacscd' is in toolbox.
(mstest-capture): New.  Tests help and custom testeeval.m.

tests/testeeval.m
New.  Test Emacs EVAL.
Uses <EMACSCAP> token with (eval) buffer to tell Emacs to set
a variable that mstest can check.
2019-12-01 20:36:49 -05:00
Eric Ludlam
ab7a262f47 tests/mtest.el:
(mstest-run-all-tests): Also turn on debugging w/ TESTDEBUG environment.
2019-11-29 15:50:28 -05:00
Eric Ludlam
786ff47e8b tests/mstest.el:
(mstest-start): Add check that matlab-shell-running-matlab-version was
successfully set during startup.
2019-11-29 11:49:30 -05:00
Eric Ludlam
4fd9bdac9d tests/+eltest/@EmacsTest/EmacsTest.m:
Add new method for debugger interface testing.
Make be a handle so we have something interesting to look at.
2019-11-29 08:53:41 -05:00
Eric Ludlam
afce4c2d56 dbtester.m:
Add more exampes code using eltest.EmacsTest.
2019-11-29 08:48:10 -05:00
Eric Ludlam
bcae0c69e1 mstest.el:
(mstest-debugger-navto): When looking @text after nav command,
be more flexible about whitespace.
2019-11-28 20:25:53 -05:00
Eric Ludlam
c29f20a97b metest.el, metest.el:
Require matlab-load to get all the auto-loads in.
2019-11-28 18:13:25 -05:00
Eric Ludlam
13e7709a96 tests/mstest.el:
Add additional debugger tests.
((mstest-run-all-tests): Enable additional debug output
if environment says so.
(mstest-error-parse): The buggy cmderr line no check is -1
so we work with diff versions of MATLAB src.
(mstest-error-command-check): If input line is negative,
don't check the line number.  (It may move.)
(mstest-debugger): Add additional debugger test points.
Test dbclear.
Test functions gud-break & gud-next, & gud-cont.
(mstest-debugger-navto):
New helper.  Test gud functions like next and continue.
Support emacs commands as debugger commands.
(mstest-cap-context): New, for debugging tests.
(mstest-debugger): Add additional test debugging features.
Add support for elisp fcns that are commands.
Make sure current buffere is the *MATLAB* buffer in more cases.
Verify what is at START location when caping output to decide if we
need to skip over echoed output or not.
2019-11-27 16:20:51 -05:00
Eric Ludlam
cd69c0f07c tests/dbtester.el
Add more stuff to debug.
2019-11-27 14:33:49 -05:00
Eric Ludlam
eda8603130 tests/mstest.el:
Add debugger tests.
(mstest-run-all-tests): Add mstest-debugger.
(mstest-error-parse): Fix comments, simplify some testing output.
(mstest-debugger): New test fcn for debugger commands and state.
(mstest-debugger-breakpoint): New util for testing state of various
breakpoint setting functions.

tests/dbtester.m
New file with interesting places to debug.
2019-11-26 16:09:48 -05:00
Eric Ludlam
7a16edc405 matlab-shell.el:
(matlab-shell-class-mref-to-file): First split input on >
to strip off local functions, then continue as before.
(matlab-shell-mref-to-filename): Operate only in the MATLAB shell buffer.
Convenience for debugging.

tests/mstest.el:
Add point for testme(true) - error in local fcn.
Fix some line numbers.

tests/+eltest/+utils/testme.m:
Add error in local fcn option.
2019-11-26 14:55:19 -05:00
Eric Ludlam
5c1d04df2a tests/Makefile:
Add -q flag for Emacs calls.
2019-11-25 23:34:43 -05:00
Eric Ludlam
6d6e390473 tests/mstest.el:
Improve output and debugging on failures.
Add syntax error test.
(matlab-run-all-tests): If interactive, turn on debugging features.
(mtest-start): Add timeouts to accept-process-output.
Add BEEP test, mostly to turn off beeping with the errors.
(mstest-error-parse): Add syntaxerr call to test this error type.
2019-11-25 23:34:17 -05:00
Eric Ludlam
a392653963 tests/mstest.el:
(mtest-error-command-check): Add second block that CDs up
so error file refs are no longer on the path.  Then re-check
that we get to the right place with last error.
2019-11-25 09:32:49 -05:00
Eric Ludlam
aed29240f9 tests/mstest.el:
Add more tests needed for error parsing.
(mstest-run-all-tests): Leave in debug flag commented out.
(mstest-start): Add tests for valid MATLABROOT,
and 'which' utility test.
(mstest-error-parse): Build utility around first test. (see below)
Use utility for 3 buggy.m tests, package fcn error test,
and class method error tests.
(mstest-error-command-check): New, copied from above.
Plus minor improvements to messages.
2019-11-24 23:24:16 -05:00
Eric Ludlam
99e3838302 Makefile:
New file, replace bash scripts for running tests.
2019-11-24 20:31:40 -05:00
Eric Ludlam
d1e9748db6 tests/mstest.el:
New set of tests to exercise matlab-shell.
Several starter tests included for startup, completion, and parsing errors.
2019-11-24 20:31:12 -05:00
Eric Ludlam
aca50341e0 tests/buggy.m:
Add more types of bugs, including a stack of bugs.
2019-11-24 20:28:47 -05:00
Eric Ludlam
260d811f03 matlab-shell.el:
Improve error highlighting.
(matlab-shell-render-errors-as-anchor): Fix scanning for the first error
in a session.
(matlab-shell-class-mref-to-file): Add fcn-p flag.
When t, convert to a function name in a package.
(matlab-shell-mref-converters): Add expression to
match functions in a package.

tests/+eltest/+utils/testme.m:
New function in a package that throws an error.
2019-11-23 20:23:32 -05:00
Eric Ludlam
3f0c078dd8 strings.m -> stringtest.m
Move to avoid warnings when CDing to this dir in MATLAB.
stringtest.m:
(met-stringtest-files): Use new name for string test file.
2019-11-23 16:58:23 -05:00
Eric Ludlam
7fd3c65af6 Example cell script for testing matlab-shell. 2019-11-23 08:52:58 -05:00
Eric Ludlam
7adebb5b4e eltest.EmacsTest.m:
New class in a package with methods that throw errors.
Use for testing error scanning.
2019-11-21 16:32:42 -05:00
Eric Ludlam
da21c4789f matlab-shell.el:
(matlab-shell-error-location-expression):
Fix error expressions to handle directories w/ + in them.
(matlab-shell-scan-for-error-test):
New command for testing.
(matlab-shell-scan-for-error):
Strip out interactive bits.

errexamples.shell.m:
Fixed location of some of the errors.
2019-11-19 12:58:14 -05:00
Eric Ludlam
59f7a234ce tests/buggy.m
tests/syntaxerr.m
tests/errexamples.shell.m:
New files with errors in them for testing MATLAB error parsing.
2019-11-17 16:04:52 -05:00
Eric Ludlam
21402281fd matlab.el: Improve block comment handling.
(matlab-font-lock-extend-region): is now added to font-lok-extend-region-functions
and handles block comment bounds.
(matlab-ltype-block-comm): now returns the bounds of the block comment
the cursor is in.  (It had to find them anyway, so now it returns them.)
(matlab-show-paren-or-block): Now does nothing if in a block comment.
(matlab-mode-vf-block-matches-forward): Also ignores hits in block comments.
tests/mpclass.m: Minor tweaks from testing.
2019-11-09 19:23:02 -05:00
Eric Ludlam
1a6a3f6a42 Update font-lock keywords for functions so that
scanning for inputs works across multiple lines.
Add fontlock.m test file.
2019-11-09 12:01:34 -05:00
Eric Ludlam
18a2314b2f semantic-matlab.el:
Add support for parsing superclasses and storing in tag.
Add a test for that.
2019-11-09 10:24:43 -05:00
Eric Ludlam
abaadab8a7 semantic-matlab.el:
Add support for method attributes (protection).
Add test.
2019-11-09 10:16:18 -05:00
Eric Ludlam
bc26e2f978 semantic-matlab.el:
Class parsing - add support for property blocks and creating tags
for the properties, including analysis of 'access' attribute.
Add tests for this.
2019-11-09 08:57:23 -05:00
Eric Ludlam
64f2249b1e Add support for parsing MATLAB Classes to semantic-matlab.el
Add test file (mplass.m) and add parsing testing to metest.el.
2019-11-08 23:34:40 -05:00
Eric Ludlam
a58df74bf1 metest.el - add metest-indents-test and support functions.
Tweak how all the test status msgs are printed to be better seperated.
Add indentation tokens to mclass.
Add new indents.m
2019-10-03 21:15:41 -04:00
Eric Ludlam
53a028e09f Added several more examples to test navigation with.
Deleted class stuff from expressions.m.  That is now in mclass.m.
Added attributes and type values to class to test font locking.
2019-09-29 19:31:31 -04:00
Eric Ludlam
d685f31c54 Add tests that verify more expressions, including those needed by show-paren-mode.
Tests the underlying function, not the show paren mode support.
2019-09-28 22:33:09 -04:00