-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
limit admonitions to attention, caution, note & tip
- Loading branch information
Showing
13 changed files
with
73 additions
and
61 deletions.
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
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
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
36 changes: 36 additions & 0 deletions
36
tests/Elastic.Markdown.Tests/Directives/AdmonitionUnsupportedTests.cs
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,36 @@ | ||
// Licensed to Elasticsearch B.V under one or more agreements. | ||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. | ||
// See the LICENSE file in the project root for more information | ||
|
||
using Elastic.Markdown.Myst.Directives; | ||
using FluentAssertions; | ||
using Xunit.Abstractions; | ||
|
||
namespace Elastic.Markdown.Tests.Directives; | ||
|
||
public abstract class AdmonitionUnsupportedTests(ITestOutputHelper output, string directive) | ||
: DirectiveTest<UnsupportedDirectiveBlock>(output, | ||
$$""" | ||
```{{{directive}}} | ||
This is an attention block | ||
``` | ||
A regular paragraph. | ||
""" | ||
) | ||
{ | ||
[Fact] | ||
public void ParsesAsUnknown() => Block.Should().NotBeNull(); | ||
|
||
[Fact] | ||
public void SetsCorrectDirective() => Block!.Directive.Should().Be(directive); | ||
} | ||
|
||
// ReSharper disable UnusedType.Global | ||
public class AttentionTests(ITestOutputHelper output) : AdmonitionUnsupportedTests(output, "attention"); | ||
public class DangerTests(ITestOutputHelper output) : AdmonitionUnsupportedTests(output, "danger"); | ||
public class ErrorTests(ITestOutputHelper output) : AdmonitionUnsupportedTests(output, "error"); | ||
public class HintTests(ITestOutputHelper output) : AdmonitionUnsupportedTests(output, "hint"); | ||
public class ImportantTests(ITestOutputHelper output) : AdmonitionUnsupportedTests(output, "important"); | ||
public class SeeAlsoTests(ITestOutputHelper output) : AdmonitionUnsupportedTests(output, "seealso"); | ||
public class AdmonitionTitleTests(ITestOutputHelper output) : AdmonitionUnsupportedTests(output, "admonition"); | ||
// ReSharper restore UnusedType.Global |