From 49344962e55cc5c6211bdf08f40547ac1a267924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Pen=CC=83alba?= Date: Thu, 5 Sep 2024 13:03:28 +0200 Subject: [PATCH] Fixed unit tests --- src/TextMateSharp.Grammars.Tests/GrammarTests.cs | 7 +++++-- .../Resources/Grammars/typst/package.json | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/TextMateSharp.Grammars.Tests/GrammarTests.cs b/src/TextMateSharp.Grammars.Tests/GrammarTests.cs index 1f56571..e414fc1 100644 --- a/src/TextMateSharp.Grammars.Tests/GrammarTests.cs +++ b/src/TextMateSharp.Grammars.Tests/GrammarTests.cs @@ -11,7 +11,7 @@ public void Get_Available_Languages_Should_Return_Content() { RegistryOptions options = new RegistryOptions(ThemeName.Light); - Assert.That(options.GetAvailableLanguages().Count, Is.EqualTo(61)); + Assert.That(options.GetAvailableLanguages().Count, Is.EqualTo(63)); } [Test] @@ -111,7 +111,10 @@ public void Assert_Every_Grammar_With_Language_Configuration_File_Has_Language_C { if (!string.IsNullOrEmpty(language.ConfigurationFile)) { - Assert.That(language.Configuration, Is.Not.Null); + if (language.Configuration == null) + { + Assert.Fail(string.Format("[{0} grammar]: Language configuration is null", language.Id)); + } } } catch (Exception ex) diff --git a/src/TextMateSharp.Grammars/Resources/Grammars/typst/package.json b/src/TextMateSharp.Grammars/Resources/Grammars/typst/package.json index d008ecb..59315a8 100644 --- a/src/TextMateSharp.Grammars/Resources/Grammars/typst/package.json +++ b/src/TextMateSharp.Grammars/Resources/Grammars/typst/package.json @@ -542,7 +542,7 @@ "languages": [ { "id": "typst", - "configuration": "./syntaxes/language-configuration.json", + "configuration": "./language-configuration.json", "extensions": [ ".typ" ], @@ -558,7 +558,7 @@ }, { "id": "typst-code", - "configuration": "./syntaxes/language-configuration.json", + "configuration": "./language-configuration.json", "extensions": [ ".typc" ],