File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
test/YesSql.Tests/Filters Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,26 @@ public void ShouldAllowMultipleNamedTerms()
262262 Assert . Equal ( "name:steve name:bill" , parser . Parse ( "name:steve name:bill" ) . ToNormalizedString ( ) ) ;
263263 }
264264
265+ [ Theory ]
266+ [ InlineData ( "extrachar:age-asc" ) ]
267+ [ InlineData ( "extrachar:age-desc" ) ]
268+ [ InlineData ( "extrachar:2020-01-01..2020-10-10" ) ]
269+ [ InlineData ( "extrachar:>ten" ) ]
270+ [ InlineData ( "extrachar:<100" ) ]
271+ [ InlineData ( "extrachar:<=100" ) ]
272+ [ InlineData ( "extrachar:100*" ) ]
273+ [ InlineData ( "extrachar:100+" ) ]
274+ public void ShouldIncludeExtraChars ( string search )
275+ {
276+ var parser = new QueryEngineBuilder < Person > ( )
277+ . WithNamedTerm ( "extrachar" , b => b . OneCondition ( PersonOneConditionQuery ( ) ) )
278+ . Build ( ) ;
279+
280+ var result = parser . Parse ( search ) ;
281+
282+ Assert . Equal ( search , result . ToString ( ) ) ;
283+ }
284+
265285 private static Func < string , IQuery < Person > , IQuery < Person > > PersonOneConditionQuery ( )
266286 {
267287 return ( val , query ) => query . With < PersonByName > ( x => x . SomeName . Contains ( val ) ) ;
You can’t perform that action at this time.
0 commit comments