sublime_text
sublime_text copied to clipboard
negative symbol tests always fail
Description of the bug
#3154 lists "none" as a valid category for negative testing, i.e. no symbol.
Using the test binary with a Github action workflow results in failing tests.
Steps to reproduce
As an example, use the code for the default packages re-write for JSON at:
https://github.com/jrappen/sublime-json
Here only top level keys in a top-level JSON object should be added to the symbols list:
// SYNTAX TEST "Packages/JSON/JSON.sublime-syntax"
// <- source.json - source.json.jsonc
{
"key": "value",
// @@@@@ definition
// ^^^^^ meta.mapping.key - meta.mapping.value meta.mapping.key
"key-two": { "key-two-one": "value", "key-two-two": "value" }
// @@@@@@@@@ definition
// ^^^^^^^^^ meta.mapping.key - meta.mapping.value meta.mapping.key
// @@@@@@@@@@@@@ none
// ^^^^^^^^^^^^^ meta.mapping.value meta.mapping.key
// @@@@@@@@@@@@@ none
// ^^^^^^^^^^^^^ meta.mapping.value meta.mapping.key
}
and:
// SYNTAX TEST "Packages/JSON/JSON.sublime-syntax"
// <- source.json - source.json.jsonc
[
{
"key-one": "value",
// @@@@@@@@@ none
// ^^^^^^^^^ meta.sequence.list meta.mapping.key
"key-two": "value"
// @@@@@@@@@ none
// ^^^^^^^^^ meta.sequence.list meta.mapping.key
}
]
Expected behavior
Passing tests.
Actual behavior
Failing tests.
/path/to/syntax_test_whatever.txt:column:line: Symbol ['xxxxxxxxxxxxxx' none] does not exist
Sublime Text build number
4131
Operating system & version
Ubuntu
Additional information
I am using the syntax test binary via Github's CI (i.e. workflow actions).
https://download.sublimetext.com/st_syntax_tests_build_***_x64.tar.xz
Symbols test
Copy of docs from: https://github.com/sublimehq/sublime_text/issues/3154
Marker is
@.
Supported by ST4087+.
none: No symbol, for negative testing.local-definition: An unindexed definition, ie. it only shows in goto definition.global-definition: An indexed-only definition, ie. it only shows in goto symbol in project.definition: A definition that is both unindexed and indexed.reference: A reference.
When a symbol test is present every symbol must be tested for exhaustively. This can be turned off using partial-symbols after SYNTAX TEST.
void foo() {
// @@@ definition
foo();
// @@@ reference
}
this() {
//@@@@ local-definition
}
Fixed in build 4147.
@BenjaminSchaaf Please re-open as this has only been partially fixed. Documentation is still missing. Please add above info to https://www.sublimetext.com/docs/syntax.html#testing.
@jrappen I've made a new issue for the documentation here: https://github.com/sublimehq/sublime_text/issues/5831