I’m working on a new Syntax, currently I’ve only implemented a few syntax elements and they are working correctly — when I check the scopes wiht Ctrl-Alt-Shit-P they are as expected.
So I thought of creating some syntax_test_*
files, but when I open the test files in the editor I always get this error message in a popup window:
Syntax tests do not work properly with tabs as indentation.
You MUST use spaces!
… even though the source files don’t contain any tabs. It seems that the problem is that the current settings in the IDE are t use tabs instead of spaces — even though in the syntax settings I’ve clearly defined it to use spaces instead of tabs, and that tabs should be 2 spaces, but it seems the settings are being ignored. I then have to manually set ST to use spaces instead of tabs, and the nagging error stops showing up.
I’m not sure the tests are actually working as they should — this is the first time I use syntax test files, and the documentation doesn’t dwelve too deeply into the topic. My impression is that the tests are not working.
When running the tests I always get:
Success: 0 assertions in 1 files passed
[Finished]
Does 0 assertions
mean that no actual test was carried out?
This is my test file:
; SYNTAX TEST "Packages/PureBasic/PureBasic.sublime-syntax"
; <- source.purebasic
; A comment line
; <- punctuation.definition.comment
; ^ source.purebasic comment.line.purebasic
Debug "something" ; A comment following code
; ^ punctuation.definition.comment.purebasic
; ^^^ source.purebasic comment.line
Debug "something"
; <- punctuation.definition.comment
… where the last test is intentionally supposed to fail. I’ve tried many variations, but always get the same results (and the nagging error message).