Skip to content

Commit

Permalink
Merge 118d363 into ae1859b
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Nov 7, 2022
2 parents ae1859b + 118d363 commit 213015a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/grammar/brightscript.tmLanguage.spec.ts
Expand Up @@ -6,6 +6,25 @@ import { standardizePath as s } from 'brighterscript';
const brightscriptTmlanguagePath = s`${__dirname}/../../syntaxes/brightscript.tmLanguage.json`;

describe('brightscript.tmlanguage.json', () => {
it('colors strings correctly', async () => {
await testGrammar(`
print "hello world", true
'^^^^ constant.language.boolean.true.brs
'^^^^^^^^^^^^^ string.quoted.double.brs
'^^^^^ keyword.control.brs
`);
});

it('colors strings with escape-looking slash correctly', async () => {
//FYI, the escaped backslash char makes the positions weird in this test.
await testGrammar(`
print "hello world\\", true
'^^^^ constant.language.boolean.true.brs
'^^^^^^^^^^^^^^ string.quoted.double.brs
'^^^^^ keyword.control.brs
`);
});

it('uses proper color for variable named `component`', async () => {
await testGrammar(`
sub main()
Expand Down

0 comments on commit 213015a

Please sign in to comment.