Exemplo n.º 1
0
        public void ReferenceInHeading()
        {
            // References defined on heading lines are ignored
            string source = @"# Foo Hello [World] Bar";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 2
0
        public void NoWarning_InlineLink()
        {
            string source = @"
# text
[stuff](#text)
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 3
0
        public void NoWarning_DifferentHeadings()
        {
            string source = @"
# test
# test 2
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 4
0
        public void NoWarning()
        {
            string source = @"
1. Foo
2. Bar
3. Test
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 5
0
        public void NoWarning_Single()
        {
            string source = @"
[test]

[test]: .
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 6
0
        public void NoWarning_InlineLink()
        {
            string source = @"
[bar][foo]

[foo]: .
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 7
0
        public void NoWarning_SameNameInlineLine()
        {
            string source = @"
[foo]

[foo]: .
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 8
0
        public void Valid_Empty()
        {
            string source = @"
```json
{}
```
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 9
0
        public void NoWarning()
        {
            string source = @"
Test[^1]

[^1]: Some text
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 10
0
        public void NoWarning_AllOne()
        {
            string source = @"
1. Foo
1. Bar
1. Test
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 11
0
        public void Microsoft_ReferenceSource()
        {
            // If there was no rewriting done here, any url would be valid (note that 'Something' has been added below)
            string source = "[Foo](https://referencesource.microsoft.com/#SystemSomething/net/System/UriEnumTypes.cs,237c8dc4861d2cfa)";

            SingleFileTest.AssertContainsWarning(source,
                                                 WarningIDs.WebRequestReturnedErrorCode);

            source = "[Foo](https://referencesource.microsoft.com/#System/net/System/UriEnumTypes.cs,237c8dc4861d2cfa)";
            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 12
0
        public void NoWarning_LinkReference()
        {
            string source = @"
[stuff]
# text

[stuff]: #text
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 13
0
        public void Valid()
        {
            string source = @"
```json
{
    ""test"": 123
}
```
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 14
0
        public void NoWarning_Multiple()
        {
            string source = @"
[test]
[stuff]
[test]

[test]: .
[stuff]: .
";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 15
0
        public void MultipleSameUrl()
        {
            string source = @"
[Stuff] [Things]

[Foo](TEST_HOST/forms/post)
[Bar](TEST_HOST/forms/post)

[Stuff]: TEST_HOST/forms/post#123
[Things]: TEST_HOST/forms/post
".Replace("TEST_HOST", Constants.TEST_HOST, StringComparison.Ordinal);

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 16
0
 public void ValidLinks_SameNameLinkReferenceDefinitions(string label, string url)
 {
     SingleFileTest.AssertNoWarnings($"[{label}]\n\n[{label}]: {url}");
 }
Exemplo n.º 17
0
 public void ValidLinks(string label, string url)
 {
     SingleFileTest.AssertNoWarnings($"[{label}]({url})");
 }
Exemplo n.º 18
0
 public void IgnoredAutoLink()
 {
     SingleFileTest.AssertNoWarnings("https://github.com/TelegramBots/Telegram.Bot/blob/master/src/Telegram.Bot/Types/Message.cs#L42");
 }
Exemplo n.º 19
0
 public void IgnoredLinks(string url)
 {
     SingleFileTest.AssertNoWarnings($"[Foo]({url})");
 }
Exemplo n.º 20
0
        public void LargeFile()
        {
            string source = "Text" + new string('\n', HugeLineCount - 1);

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 21
0
 public void DocumentationReserved(string value)
 {
     SingleFileTest.AssertNoWarnings(value);
 }
Exemplo n.º 22
0
        public void NoWarning()
        {
            string source = @"[text](.)";

            SingleFileTest.AssertNoWarnings(source);
        }
Exemplo n.º 23
0
        public void NoWarning_SingleHeading()
        {
            string source = @"# test";

            SingleFileTest.AssertNoWarnings(source);
        }