diff --git a/src/Docfx.Build.Engine/ManifestProcessor.cs b/src/Docfx.Build.Engine/ManifestProcessor.cs index 1ecb492ea49..3912630a1a3 100644 --- a/src/Docfx.Build.Engine/ManifestProcessor.cs +++ b/src/Docfx.Build.Engine/ManifestProcessor.cs @@ -77,7 +77,7 @@ private void UpdateContext() private void NormalizeToObject() { - Logger.LogVerbose("Normalizing all the object to week type"); + Logger.LogVerbose("Normalizing all the object to weak type"); _manifestWithContext.RunAll(m => { diff --git a/src/Docfx.Build.SchemaDriven/OverwriteApplier.cs b/src/Docfx.Build.SchemaDriven/OverwriteApplier.cs index 4592849f268..9604ff587c3 100644 --- a/src/Docfx.Build.SchemaDriven/OverwriteApplier.cs +++ b/src/Docfx.Build.SchemaDriven/OverwriteApplier.cs @@ -98,7 +98,7 @@ public object BuildOverwriteWithSchema(FileModel owModel, OverwriteDocumentModel transformed["conceptual"] = context.ContentAnchorParser.Content; } - // add SourceDetail back to transformed, in week type + // add SourceDetail back to transformed, in weak type if (overwrite.Documentation != null) { transformed[Constants.PropertyName.Documentation] = new Dictionary diff --git a/test/Docfx.Build.Engine.Tests/XRefMapDownloaderTest.cs b/test/Docfx.Build.Engine.Tests/XRefMapDownloaderTest.cs index 2f2875453e4..e7536736935 100644 --- a/test/Docfx.Build.Engine.Tests/XRefMapDownloaderTest.cs +++ b/test/Docfx.Build.Engine.Tests/XRefMapDownloaderTest.cs @@ -23,9 +23,6 @@ public async Task BaseUrlIsSet() [Fact] public async Task ReadLocalXRefMapWithFallback() { - // GitHub doesn't support TLS 1.1 since Feb 23, 2018. See: https://github.com/blog/2507-weak-cryptographic-standards-removed - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; - var basePath = Path.GetRandomFileName(); var fallbackFolders = new List() { Path.Combine(Directory.GetCurrentDirectory(), "TestData") }; var xrefmaps = new List() { "xrefmap.yml" }; diff --git a/test/Docfx.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs b/test/Docfx.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs index 678098f6fe3..be09fbf1983 100644 --- a/test/Docfx.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs +++ b/test/Docfx.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs @@ -269,7 +269,7 @@ public void ProcessMrefWithRemarksOverwriteShouldSucceed() } } - [Fact(Skip = "Markdig does not support multi-uid overwrite")] + [Fact] public void ProcessMrefWithMultiUidOverwriteShouldSucceed() { var files = new FileCollection(_defaultFiles); @@ -281,7 +281,7 @@ public void ProcessMrefWithMultiUidOverwriteShouldSucceed() var model = JsonUtility.Deserialize(outputRawModelPath); Assert.Equal("\n

Overwrite content1

\n", model.Conceptual); Assert.Equal("\n

Overwrite "content2"

\n", model.Summary); - Assert.Equal("\n

Overwrite 'content3'

\n", model.Metadata["not_defined_property"]); + Assert.Equal("\n

Overwrite 'content3'

\n", model.Metadata["not_defined_property"]); } } diff --git a/test/Docfx.Build.SchemaDriven.Tests/LimitationReachedTest.cs b/test/Docfx.Build.SchemaDriven.Tests/LimitationReachedTest.cs index 25b15bcc911..81ee8202e28 100644 --- a/test/Docfx.Build.SchemaDriven.Tests/LimitationReachedTest.cs +++ b/test/Docfx.Build.SchemaDriven.Tests/LimitationReachedTest.cs @@ -42,39 +42,6 @@ public LimitationReachedTest() _templateManager = new TemplateManager(new List { "template" }, null, _templateFolder); } - [Fact(Skip = "Manually run this testcase, as it will influence the result of other test cases")] - public void TestSchemaReachedLimits() - { - // Json.NET schema has limitation of 1000 calls per hour - using var listener = new TestListenerScope("TestInvalidMetadataReference"); - var schemaFile = CreateFile("template/schemas/limit.test.schema.json", @" -{ - ""$schema"": ""http://dotnet.github.io/docfx/schemas/v1.0/schema.json#"", - ""version"": ""1.0.0"", - ""title"": ""LimitTest"", - ""description"": ""A simple test schema for sdp"", - ""type"": ""object"", - ""properties"": { - ""metadata"": { - ""type"": ""string"" - } - } -} -", _templateFolder); - - var inputFiles = Enumerable.Range(0, 2000) - .Select(s => CreateFile($"normal{s}.yml", @"### YamlMime:LimitTest -metadata: Web Apps Documentation -", _inputFolder)).ToArray(); - - FileCollection files = new(_defaultFiles); - files.Add(DocumentType.Article, inputFiles, _inputFolder); - BuildDocument(files); - Assert.Equal(2, listener.Items.Count); - Assert.Single(listener.Items.Where(s => s.Message == "There is no template processing document type(s): LimitTest")); - Assert.True(LimitationReached(listener)); - } - private void BuildDocument(FileCollection files) { var parameters = new DocumentBuildParameters diff --git a/test/Docfx.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs b/test/Docfx.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs index 029f78c2d5f..7c9d583a22a 100644 --- a/test/Docfx.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs +++ b/test/Docfx.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs @@ -264,8 +264,8 @@ static void Main() } [Fact] - [Trait("Related", "DfmMarkdown")] - public void TestDfmFencesBlockLevel() + [Trait("Related", "Markdown")] + public void TestFencesBlockLevel() { var root = @" [!code-FakeREST[REST](api.json)] @@ -292,7 +292,7 @@ public void TestDfmFencesBlockLevel() } [Theory] - [Trait("Related", "DfmMarkdown")] + [Trait("Related", "Markdown")] #region Inline Data [InlineData(@"[!code-csharp[Main](Program.cs)]", @"
namespace ConsoleApplication1
 {
@@ -540,7 +540,7 @@ internal static class Helper
 }
 
")] #endregion - public void TestDfmFencesBlockLevelWithQueryString(string fencesPath, string expectedContent) + public void TestFencesBlockLevelWithQueryString(string fencesPath, string expectedContent) { // arrange var content = @"namespace ConsoleApplication1 @@ -581,8 +581,8 @@ public static void Foo() } [Fact] - [Trait("Related", "DfmMarkdown")] - public void TestDfmFencesBlockLevelWithWhitespaceLeading() + [Trait("Related", "Markdown")] + public void TestFencesBlockLevelWithWhitespaceLeading() { var root = @" [!code-FakeREST[REST](api.json)] @@ -655,8 +655,8 @@ public Greet(string who) } [Fact] - [Trait("Related", "DfmMarkdown")] - public void TestDfmFencesBlockLevelWithWorkingFolder() + [Trait("Related", "Markdown")] + public void TestFencesBlockLevelWithWorkingFolder() { var root = @"[!code-REST[REST](~/api.json)]"; var apiJsonContent = @" @@ -687,6 +687,7 @@ public void TestDfmFencesBlockLevelWithWorkingFolder() } [Fact] + [Trait("Related", "Markdown")] public void CodeSnippetShouldVerifyTagname() { //arrange diff --git a/test/Docfx.MarkdigEngine.Extensions.Tests/MathematicsTest.cs b/test/Docfx.MarkdigEngine.Extensions.Tests/MathematicsTest.cs index bec8be743f8..c3c13ee76c7 100644 --- a/test/Docfx.MarkdigEngine.Extensions.Tests/MathematicsTest.cs +++ b/test/Docfx.MarkdigEngine.Extensions.Tests/MathematicsTest.cs @@ -7,20 +7,20 @@ namespace Docfx.MarkdigEngine.Tests; public class MathematicsTest { - [Fact(Skip = "Disable math support")] + [Fact] public void Test_Mathematics_Support_0() { var source = "$ math inline $"; - var expected = @"

math inline

"; + var expected = """

\(math inline\)

"""; TestUtility.VerifyMarkup(source, expected); } - [Fact(Skip = "Disable math support")] + [Fact] public void Test_Mathematics_Support_1() { var source = "$ math^0 **inline** $"; - var expected = @"

math^0 **inline**

"; + var expected = """

\(math^0 **inline**\)

"""; TestUtility.VerifyMarkup(source, expected); } diff --git a/test/docfx.Tests/MetadataCommandTest.cs b/test/docfx.Tests/MetadataCommandTest.cs index 8f22bd92187..f2ef37701f3 100644 --- a/test/docfx.Tests/MetadataCommandTest.cs +++ b/test/docfx.Tests/MetadataCommandTest.cs @@ -43,24 +43,6 @@ public void TestMetadataCommandFromCSProject() CheckResult(); } - [Fact] - [Trait("Related", "docfx")] - public void TestMetadataCommandFromCSProjectWithVsinstalldirEnvSet() - { - var envName = "VSINSTALLDIR"; - var originalValue = Environment.GetEnvironmentVariable(envName); - Environment.SetEnvironmentVariable(envName, "c:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise"); - - try - { - TestMetadataCommandFromCSProject(); - } - finally - { - Environment.SetEnvironmentVariable(envName, originalValue); - } - } - [Fact] [Trait("Related", "docfx")] public void TestMetadataCommandFromDll() @@ -261,7 +243,7 @@ public void TestMetadataCommandFromCSProjectWithFilterInOption() Assert.NotNull(memberViewModel.References.Find(s => s.Uid.Equals("Foo"))); } - [Fact(Skip = "Don't know why this fails.")] + [Fact] [Trait("Related", "docfx")] public void TestMetadataCommandFromCSProjectWithDuplicateProjectReference() {