コード例 #1
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
        public void Parse_XModeComment_FlagSet_Multiline_CommentLastCharacter()
        {
            const string pattern = @"abc#
def";

            RoundTripHelper.AssertRoundTrips(pattern, RegexOptions.IgnorePatternWhitespace | RegexOptions.Multiline);
        }
コード例 #2
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void PatternWhitespace_WhitespaceIgnored_NoEscaping()
 {
     RoundTripHelper.AssertRoundTrips(@"This is a pattern with whitespace", RegexOptions.IgnorePatternWhitespace);
 }
コード例 #3
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_CharacterClass_NonWhitespace()
 {
     RoundTripHelper.AssertRoundTrips(@"\S");
 }
コード例 #4
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_InlineComment_AtTheEnd()
 {
     RoundTripHelper.AssertRoundTrips(@"ab(?#End)");
 }
コード例 #5
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_CharacterClass_Wildcard()
 {
     RoundTripHelper.AssertRoundTrips(".");
 }
コード例 #6
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_InlineOptions_DisableOnly()
 {
     RoundTripHelper.AssertRoundTrips(@"A(?-i)a");
 }
コード例 #7
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_InlineComment_AtTheBeginning()
 {
     RoundTripHelper.AssertRoundTrips(@"(?#Start)ab");
 }
コード例 #8
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_AtLeast()
 {
     RoundTripHelper.AssertRoundTrips("a{5,}");
 }
コード例 #9
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_AtLeast_WithWhitespace()
 {
     RoundTripHelper.AssertRoundTrips("a{ 5 , }", RegexOptions.None, "a{5,}");
 }
コード例 #10
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_Exactly()
 {
     RoundTripHelper.AssertRoundTrips("a{5}");
 }
コード例 #11
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_Exactly_WithWhitespace()
 {
     RoundTripHelper.AssertRoundTrips("a{ 5 }", RegexOptions.None, "a{5}");
 }
コード例 #12
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_ZeroOrOne()
 {
     RoundTripHelper.AssertRoundTrips("a?");
 }
コード例 #13
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_OneOrMore()
 {
     RoundTripHelper.AssertRoundTrips("a+");
 }
コード例 #14
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Anchor_B()
 {
     RoundTripHelper.AssertRoundTrips(@"\B");
 }
コード例 #15
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_ConditionalAlternation_WithAlternative()
 {
     RoundTripHelper.AssertRoundTrips(@"(?(a)a|b)");
 }
コード例 #16
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_Between()
 {
     RoundTripHelper.AssertRoundTrips("a{5,10}");
 }
コード例 #17
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_InlineOptions_EnableOnly()
 {
     RoundTripHelper.AssertRoundTrips(@"a(?i)A");
 }
コード例 #18
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_Between_WithWhitespace()
 {
     RoundTripHelper.AssertRoundTrips("a{   5   ,   10  }", RegexOptions.None, "a{5,10}");
 }
コード例 #19
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_InlineOptions_EnableAndDisable()
 {
     RoundTripHelper.AssertRoundTrips(@"A(?imnx-imnx)a");
 }
コード例 #20
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Alternation_ThreeOptions()
 {
     RoundTripHelper.AssertRoundTrips(@"a|b|c");
 }
コード例 #21
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_InlineComment_InTheMiddle()
 {
     RoundTripHelper.AssertRoundTrips(@"a(?#Middle)b");
 }
コード例 #22
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Anchor_Quantified()
 {
     RoundTripHelper.AssertRoundTrips(@"^*");
 }
コード例 #23
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_InlineComment_WithWhitespace()
 {
     RoundTripHelper.AssertRoundTrips(@"a(?# I contain whitespace!! )b");
 }
コード例 #24
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Alternation_SeveralCompoundOptions()
 {
     RoundTripHelper.AssertRoundTrips(@"abc|def|ghi|jkl|mno|pqrs|tuv|wxyz");
 }
コード例 #25
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_XModeComment_FlagSet_CommentLastCharacter()
 {
     RoundTripHelper.AssertRoundTrips("abc#", RegexOptions.IgnorePatternWhitespace);
 }
コード例 #26
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Alternation_InsideGroup()
 {
     RoundTripHelper.AssertRoundTrips(@"(a|b)");
 }
コード例 #27
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_CharacterClass_NonWord()
 {
     RoundTripHelper.AssertRoundTrips(@"\W");
 }
コード例 #28
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Alternation_NestedGroups()
 {
     RoundTripHelper.AssertRoundTrips(@"a(b|(c|d|e)|f)g");
 }
コード例 #29
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_CharacterClass_Digit()
 {
     RoundTripHelper.AssertRoundTrips(@"\d");
 }
コード例 #30
0
ファイル: ParserTester.cs プロジェクト: jehugaleahsa/RegexUp
 public void Parse_Literal_MultipleCharacters()
 {
     RoundTripHelper.AssertRoundTrips("abc");
 }