#! @BIN_PATH@/crm # this program exercises the matching functionality of crm. It expects # an input that may contain foo*, bar*, and possibly START baz END window output /:*:_nl: CRM114 testing match functionality :*:_nl:/ { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing exact match on foo.../ match <> (:x:) /foo/ output / found exact match on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing exact match on foo.../ match <> (:x:) /foo/ output / found exact match on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing absent match on foo.../ match () /foo/ output / match says "no foo found"./ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing absent match on foo.../ match () /foo/ output / match says "no foo found"./ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing nocase match on foo.../ match (:x:) /foo/ output / found a nocase match on ':*:x:' / } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing nocase match on foo.../ match (:x:) /foo/ output / found a nocase match on ':*:x:' / } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing nocase absent match on foo.../ match /foo/ output / match says "no foo found"./ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing nocase absent match on foo.../ match /foo/ output / match says "no foo found"./ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing multiline match on foo.../ match <> (:x:) /.*foo.*/ output / found an allowed multiline match on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing multiline match on foo.../ match <> (:x:) /.*foo.*/ output / found an allowed multiline match on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing nomultiline match on foo.../ match (:x:) /.*foo.*/ output / found a nomultiline match on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing nomultiline match on foo.../ match (:x:) /.*foo.*/ output / found a nomultiline match on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing fromendchar match for foo then bar.../ match () /foo/ output /... found the foo.../ match () /bar/ output /then bar / } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing fromendchar match for foo then bar.../ match () /foo/ output /... found the foo.../ match () /bar/ output /found a bar after the foo. :*:_nl:/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing fromnext match for f+oo+../ match <> (:x:) /f+oo+/ output / first ':*:x:'../ match (:x:) /f+oo+/ output / found one on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing fromnext match for f+oo+../ match <> (:x:) /f+oo+/ output / first ':*:x:'../ match (:x:) /f+oo+/ output / found one on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing newend match for f+oo+../ match <> (:x:) /f+oo+/ output / first ':*:x:'../ match (:x:) /f+oo+/ output / found one on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing newend match for f+oo+../ match <> (:x:) /f+oo+/ output / first ':*:x:'../ match (:x:) /f+oo+/ output / found one on ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing indirect goto ":twist:" and ":shout:"..../ match <> (:x: :whereto:) /go to (:twist:|:shout:)/ output / got :*:whereto:.../ goto /:*:whereto:/ output / FAILED - shouldn't get here. / FAIL :twist: output / got to TWIST./ FAIL :shout: output / got to SHOUT./ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing indirect goto ":twist:" and ":shout:"..../ match <> (:x: :whereto:) /go to (:twist2:|:shout2:)/ output / got :*:whereto:.../ goto /:*:whereto:/ output / FAILED - shouldn't get here. / FAIL :twist2: output / got to TWIST./ FAIL :shout2: output / got to SHOUT./ } { window /ZZZ/ /ZZZ/ output / :*:_nl:Testing self-supplied-match .../ match (:x: :pat:) /foo(.*)bar/ output / found ':*:pat:' .../ match (:x:) /.*:*:pat:.*/ output / found ':*:x:'/ } { window /ZZZ/ /ZZZ/ output / :*:_nl:Testing self-supplied-match .../ match (:x: :pat:) /foo(.*)bar/ output / found ':*:pat:' .../ match (:x:) /.*:*:pat:.*/ output / found ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing indep start\/end .../ match (:f:) /foo.*foo/ output / found ':*:f:' .../ match (:x:) [:f:] /1/ output / found ':*:x:' .../ match (:b:) /bar.*bar/ output / found ':*:b:'.../ match (:x:) [:b:] /2/ output / found ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing indep start\/end .../ match (:f:) /foo.*foo/ output / found ':*:f:' .../ match (:x:) [:f:] /1/ output / found ':*:x:' .../ match (:b:) /bar.*bar/ output / found ':*:b:'.../ match (:x:) [:b:] /2/ output / found ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing indep start\/end .../ match (:f:) /foo.*foo/ output / found ':*:f:' .../ match (:x:) [:f:] /1/ output / found ':*:x:' .../ match (:b:) /bar.*bar/ output / found ':*:b:'.../ match (:x:) [:b:] /2/ output / found ':*:x:'/ } { window /ZZZ/ /ZZZ/ output /:*:_nl:Testing indep start\/end .../ match (:f:) /foo.*foo/ output / found ':*:f:' .../ match (:x:) [:f:] /1/ output / found ':*:x:' .../ match (:b:) /bar.*bar/ output / found ':*:b:'.../ match (:x:) [:b:] /2/ output / found ':*:x:'/ } { alter (:_dw:) /Test text >correct< results hopefully/ output /\nTesting box region control\n/ match [:_dw: 11 7] /.*/ (:x:) output /got 10-17 as this: :*:x: (should be 'correct', no angles)\n/ } { alter (:_dw:) /Test text >correct< results hopefully/ output /\nTesting box region control, part 2\n/ match [:_dw: 11 7] /r.*c/ (:x:) output /got 10-17 as this: :*:x: (should be 'rrec')\n/ } { isolate (:z:) /Test text >correct< results hopefully without problems/ output /\nTesting box region control, isolated var\n/ match [:z: 11 7] /r.*c/ (:x:) output /got 10-17 as this: :*:x: (should be 'rrec')\n/ match [:z:] /e..../ (:y:) output /Fromend match: :*:y: (should be 'esult')\n/ } # output /:*:_nl:------------------END OF TESTING----------------------:*:_nl:/