Helpers for symbol tests
Via https://github.com/sublimehq/sublime_text/issues/3154, ST can test for symbol definitions and references. While not as important as completions for scope tests, PD should provide some automation for these. Ideas include:
- [ ] Span entire symbol region when
@is pressed on a test line/comment - [ ] Automatically determine which category the marked symbol belongs to
- [ ] Supply/Open AC with symbol categories
While we are discussing helpers for tests...
Apart from:
- syntax tests and
- tests for symbol definitions and references
there is furthermore the ability to run:
- indentation tests
by adding the reindent keyword to the header line in test files.
Compare for example:
https://github.com/sublimehq/Packages/blob/master/PHP/tests/syntax_test_indentation.php
// SYNTAX TEST reindent "Packages/PHP/PHP.sublime-syntax"
...
@jrappen What form would a helper take for a file indentation test?
I believe no helper is required for indentation tests - just reindenting the whole file is enough to get the tests prepared, if it isn't already. :) (this is true for both reindent-unchanged and reindent-unindented)
Maybe no helpers as Keith said, but instead additions to the New Syntax Definition... section in the:
Tools > Packages > Package Development > ...
menu where the new options:
- New test for current syntax
- New indentation tests for current syntax
- New symbol definitions and references test for current syntax
could be enabled when having a syntax file currently opened. Same for the command palette.
Or maybe add one entry which generates all types of tests into new empty views, so the user can work off those? My gut feeling is this would make more sense. I guess leading block (s of line) comments with references on how to do each of them would help, too.
One thing I am excited for is for the highlighting from ^ lines to stop getting stuck on @ lines. I've added some reference tests, and now clicking on a scope test below a reference test highlights the reference test line instead of the actual line of code to be tested.