ST 3175 x86_64 | Win 10
The problem persists, when the BOM is present the tests don’t get executed because ST fails to detect the comments delimiter from first line.
Basically, every time I edit the syntax source file with the language’s native IDE, it adds again a BOM at save time, and I have to remove it in ST.
ST is aware of the BOM, for in the status bar it shows encoding as “UTF-8 with BOM”.
If I click on the enconding and choose “Set encoding -> UTF-8”, it removes the BOM and the test works.
ST should really check for the presence of a BOM in test files, and skip it when parsing the comments delimiters, without forcing the user to remove the BOM from the file and make the source file not compliant to its native IDE standards.
When creating test files for languages which have a native IDE, it’s useful to be able to work with the native IDE too, especially when building a new ST syntax, for one would like to be able to use code that really works in that language, or just beacause the native IDE simplifies editing code, etc. But if we need to add/remove the BOM each time the test file is opened with ST or its native IDE it gets annoying (and usually it’s convenient to work with the test file opened in both editors at the same time). Also, if the native IDE supports different file encodings, removing the BOM could lead to special characters corruption.