File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
tests/HydraScript.UnitTests/Domain/FrontEnd Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,22 @@ public void EmptyTextTest() =>
3636 Assert . NotEmpty ( _regexLexer . GetTokens ( "" ) ) ;
3737
3838 [ Fact ]
39- public void GetTokensSkipIgnorableTypesTest ( )
39+ public void GetTokens_IgnorableTypes_Skipped ( )
4040 {
4141 const string text = "let x = 1 // int" ;
4242 var tokens = _regexLexer . GetTokens ( text ) ;
43- Assert . DoesNotContain ( _regexLexer . Structure . FindByTag ( "Comment" ) , tokens . Select ( x => x . Type ) ) ;
43+ Assert . DoesNotContain ( _regexLexer . Structure . FindByTag ( "DoubleSlashComment" ) , tokens . Select ( x => x . Type ) ) ;
44+ }
45+
46+ [ Fact ]
47+ public void GetTokens_Comments_EmptyList ( )
48+ {
49+ const string text = """
50+ // double slash comment
51+ # shebang comment
52+ """ ;
53+ var tokens = _regexLexer . GetTokens ( text ) ;
54+ Assert . Empty ( tokens . Except ( [ new EndToken ( ) ] ) ) ;
4455 }
4556
4657 [ Theory , ClassData ( typeof ( LexerKeywordInsideIdentData ) ) ]
You can’t perform that action at this time.
0 commit comments