-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add grammar support for new directives: rendermode, preservewhitespac…
…e and typeparam (#6887) * added grammar support for new directives - added grammar support for rendermode, preservewhitespace and typeparam in tmLanguage.yml - populated the corresponding json file with the npm run compile:razorTextMate command - added the corresponding tests in Microsoft.AspNetCore.Razor.VSCode.Grammar.Test. Also added the tests in the snapshot.
- Loading branch information
Showing
7 changed files
with
377 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...Tests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { describe, it } from '@jest/globals'; | ||
import { assertMatchesSnapshot } from './infrastructure/testUtilities'; | ||
|
||
// See GrammarTests.test.ts for details on exporting this test suite instead of running in place. | ||
|
||
export function RunPreservewhitespaceDirectiveSuite() { | ||
describe('@preservewhitespace directive', () => { | ||
it('No bool', async () => { | ||
await assertMatchesSnapshot('@preservewhitespace'); | ||
}); | ||
|
||
it('No bool spaced', async () => { | ||
await assertMatchesSnapshot('@preservewhitespace '); | ||
}); | ||
|
||
it('Incomplete bool', async () => { | ||
await assertMatchesSnapshot('@preservewhitespace fal'); | ||
}); | ||
|
||
it('Bool provided (true)', async () => { | ||
await assertMatchesSnapshot('@preservewhitespace true'); | ||
}); | ||
|
||
it('Bool provided (false)', async () => { | ||
await assertMatchesSnapshot('@preservewhitespace false'); | ||
}); | ||
|
||
it('Bool provided spaced', async () => { | ||
await assertMatchesSnapshot('@preservewhitespace false '); | ||
}); | ||
}); | ||
} |
Oops, something went wrong.