Transforming symbols breaks implied global-definition
tests using @@@ definition "transformed-symbol"
#6596
Labels
global-definition
tests using @@@ definition "transformed-symbol"
#6596
Description of the bug
When defining symbols and setting up automated syntax tests for them, things (currently) work as expected. Adding symbol transformation partially breaks tests.
Implied
local-definition
seems to work, impliedglobal-definition
does not, when using@@@ definition "transformed-symbol"
in syntax tests.Steps to reproduce
Transform symbols, as an example we use JSON.
To quickly test this, use the JSON rewrite for sublimehq/Packages#3097 found at https://github.com/jrappen/sublime-json/ with the following changes:
Expected behavior
Top-level keys of a JSON object should here be added to the index even after transformation.
Actual behavior
When adding symbol transformation, previously working syntax tests break.
The symbol
"key-one"
in the test file is transformed tokey-one
and we need to add it quoted to the test line in thesyntax_test_*
file.Compare the docs at https://www.sublimetext.com/docs/syntax.html#testing:
The test binary reports the following:
We see here that:
definition
, the actual test only showslocal-definition
being tested, notdefinition
as stated in the line of the syntax test file which implies that bothglobal-definition
andlocal-definition
are included in the test.We see here that:
"key-one"
in line 6 (the symbol before the transformation), but only testskey-one
in line 6 (the symbol after the transformation).global-definition
is now tested for, but in the wrong location.Compare the following from the two images above:
Sublime Text build number
4191
Operating system & version
any
(Linux) Desktop environment and/or window manager
any
The text was updated successfully, but these errors were encountered: