@@ -76,6 +76,37 @@ describe('Builder Test', () => {
7676 assert . equal ( matches [ 1 ] , 'green' )
7777 } )
7878
79+ it ( 'More Methods' , ( ) => {
80+ const regex = new SRL ( )
81+ . noWhitespace ( )
82+ . literally ( 'a' )
83+ . ifFollowedBy ( ( builder ) => {
84+ return builder . noCharacter ( )
85+ } )
86+ . tab ( )
87+ . mustEnd ( )
88+ . multiLine ( )
89+ . get ( )
90+ const target = `
91+ ba\t
92+ aaabbb
93+ `
94+ assert . ok ( regex . test ( target ) )
95+
96+ const regex2 = new SRL ( )
97+ . startsWith ( )
98+ . literally ( 'a' )
99+ . newLine ( )
100+ . whitespace ( )
101+ . onceOrMore ( )
102+ . literally ( 'b' )
103+ . mustEnd ( )
104+ . get ( )
105+ const target2 = `a
106+ b`
107+ assert . ok ( regex2 . test ( target2 ) )
108+ } )
109+
79110 it ( 'Replace' , ( ) => {
80111 const regex = new SRL ( )
81112 . capture ( ( query ) => {
@@ -107,6 +138,17 @@ describe('Builder Test', () => {
107138 const matches = ',, ' . match ( regex )
108139 assert . equal ( matches [ 1 ] , ',,' )
109140 assert . notEqual ( matches [ 1 ] , ',, ' )
141+
142+ const regex2 = new SRL ( )
143+ . literally ( ',' )
144+ . atLeast ( 1 )
145+ . lazy ( )
146+ . get ( )
147+
148+ const matches2 = regex2 . exec ( ',,,,,' )
149+ assert . equal ( matches2 [ 0 ] , ',' )
150+ assert . notEqual ( matches2 [ 0 ] , ',,,,,' )
151+
110152 } )
111153
112154 it ( 'Global' , ( ) => {
0 commit comments