- Timestamp:
- 10/11/08 15:45:59 (6 weeks ago)
- Files:
-
- 1 modified
-
t/spec/S05-mass/rx.t (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S05-mass/rx.t
r22178 r22579 5 5 ### for now 6 6 sub matchcheck { 1 } 7 8 # L</S05/Backtracking control/"To force the preceding atom to do no 9 # backtracking"> 7 10 8 11 ## Backtracking control tests … … 33 36 ok 'verify' ~~ /[ if not | ify ]/, 'control'; 34 37 38 # L</S05/Backtracking control/"Backtracking over a double colon"> 39 35 40 #### [ if :: not | ify ] verify n inside a group 36 41 ok 'verify' !~~ /[ if :: not | ify ]/, 'inside a group'; … … 47 52 ok 'verify' ~~ /[ if :: not | ify ] | verify/, 'rule continues'; 48 53 54 # L</S05/Backtracking control/"Backtracking over a triple colon"> 49 55 #### [ when ever ] | whence whence y full backtrack failure 50 56 ok 'whence' ~~ /[ when ever ] | whence/, 'full backtrack failure'; … … 77 83 ok 'whence' !~~ /[ when <commit> ever ] | whence/, 'full backtrack failure'; 78 84 85 #L<S05/Modifiers/"The new :ratchet modifier"> 79 86 80 87 #### :ratchet a* a bazaar n ratchet modifier … … 84 91 ok 'bazaar' ~~ /:ratchet a*! a/, 'force backtracking !'; 85 92 86 87 ## vim: noexpandtab tabstop=4 shiftwidth=4 93 #L<S05/Unchanged syntactic features/"Capturing: (...)"> 94 88 95 ## captures 89 96 #### (a.)..(..) zzzabcdefzzz y basic match … … 287 294 ok ('12ab34' ~~ /<key=alpha>/) ~~ Match where matchcheck($_, q/mob<key>: <a @ 2>/), 'alias capture'; 288 295 289 290 ## vim: noexpandtab tabstop=4 shiftwidth=4 296 # L<S05/Extensible metasyntax (C<< <...> >>)/"A leading [ indicates"> 297 291 298 ## Enumerated character lists 292 299 #### <[c]> abcdef y character class … … 304 311 ok 'abcdef' ~~ /^<[a]>/, 'anchored character class'; 305 312 313 # L<S05/Extensible metasyntax (C<< <...> >>)/"A leading - indicates"> 314 306 315 #### <-[e]> abcdef y negated character class 307 316 ok 'abcdef' ~~ /<-[e]>/, 'negated character class'; … … 322 331 ok 'abcdef' !~~ /^<-[a]>/, 'anchored negated character class'; 323 332 333 # L<S05/Extensible metasyntax (C<< <...> >>)/"Ranges in enumerated character classes"> 324 334 #### <[b..d]> abcdef y character range 325 335 ok 'abcdef' ~~ /<[b..d]>/, 'character range'; … … 490 500 ok 'abxab' ~~ /(ab)"x$0"/, 'literal match with interpolation'; 491 501 502 # L<S05/Extensible metasyntax (C<< <...> >>)/"A leading ? indicates"> 503 # 492 504 #### '?' ab<? y literal match with question mark 493 505 ok 'ab<?' ~~ /'?'/, 'literal match with question mark'; … … 571 583 #?pugs todo 'feature' 572 584 ok 'axxbxxyc' ~~ /<after x+>y/, 'lookbehind <after>'; 585 586 # L<S05/Extensible metasyntax (C<< <...> >>)/"A leading + may also"> 573 587 574 588 #### <[a..z]>+ az y metasyntax with leading + (<+...>) … … 2383 2397 ok "abc\ndef\n-==\nghi" !~~ /\-<?wb>/, '\W\W word boundary'; 2384 2398 2399 # L<S05/Extensible metasyntax (C<< <...> >>)/"A leading ! indicates"> 2400 2385 2401 #### <!wb>def abc\ndef\n-==\nghi n nonword boundary \W\w 2386 2402 ok "abc\ndef\n-==\nghi" !~~ /<!wb>def/, 'nonword boundary \W\w';
