@@ -30,11 +30,41 @@ describe('inputs', () => {
3030 expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[fo\\\\\\]\\\\\\^\\]/' )
3131 expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[fo\\]\\^]' > ( )
3232 } )
33+ it ( 'charIn.orChar' , ( ) => {
34+ const input = charIn ( 'a' ) . orChar ( 'b' )
35+ expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[ab\\]/' )
36+ expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[ab]' > ( )
37+ } )
38+ it ( 'charIn.orChar.from' , ( ) => {
39+ const input = charIn ( 'a' ) . orChar . from ( 'a' , 'b' )
40+ expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[aa-b\\]/' )
41+ expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[aa-b]' > ( )
42+ } )
43+ it ( 'charIn.from' , ( ) => {
44+ const input = charIn . from ( 'a' , 'b' )
45+ expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[a-b\\]/' )
46+ expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[a-b]' > ( )
47+ } )
3348 it ( 'charNotIn' , ( ) => {
3449 const input = charNotIn ( 'fo^-' )
3550 expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[\\^fo\\\\\\^\\\\-\\]/' )
3651 expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[^fo\\^\\-]' > ( )
3752 } )
53+ it ( 'charNotIn.orChar' , ( ) => {
54+ const input = charNotIn ( 'a' ) . orChar ( 'b' )
55+ expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[\\^ab\\]/' )
56+ expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[^ab]' > ( )
57+ } )
58+ it ( 'charNotIn.orChar.from' , ( ) => {
59+ const input = charNotIn ( 'a' ) . orChar . from ( 'a' , 'b' )
60+ expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[\\^aa-b\\]/' )
61+ expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[^aa-b]' > ( )
62+ } )
63+ it ( 'charNotIn.from' , ( ) => {
64+ const input = charNotIn . from ( 'a' , 'b' )
65+ expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[\\^a-b\\]/' )
66+ expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[^a-b]' > ( )
67+ } )
3868 it ( 'anyOf' , ( ) => {
3969 const values = [ 'fo/o' , 'bar' , 'baz' , oneOrMore ( 'this' ) ] as const
4070 const input = anyOf ( ...values )
0 commit comments