diff options
Diffstat (limited to 'src/vs/editor/test/common/modes/languageSelector.test.ts')
-rw-r--r-- | src/vs/editor/test/common/modes/languageSelector.test.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vs/editor/test/common/modes/languageSelector.test.ts b/src/vs/editor/test/common/modes/languageSelector.test.ts index e2d59071382..53cba5e386e 100644 --- a/src/vs/editor/test/common/modes/languageSelector.test.ts +++ b/src/vs/editor/test/common/modes/languageSelector.test.ts @@ -131,4 +131,23 @@ suite('LanguageSelector', function () { let value = score(selector, URI.file('/home/user/Desktop/test.json'), 'json', true, undefined); assert.strictEqual(value, 10); }); + + test('NotebookType without notebook', function () { + let obj = { + uri: URI.parse('file:///my/file.bat'), + langId: 'bat', + }; + + let value = score({ + language: 'bat', + notebookType: 'xxx' + }, obj.uri, obj.langId, true, undefined); + assert.strictEqual(value, 0); + + value = score({ + language: 'bat', + notebookType: '*' + }, obj.uri, obj.langId, true, undefined); + assert.strictEqual(value, 0); + }); }); |