Enclosed patch fixes up a few more holes in our test coverage.
Simon --- t/op/rx.t.old Sun Mar 10 13:14:34 2002 +++ t/op/rx.t Sun Mar 10 13:36:01 2002 @@ -1,4 +1,4 @@ -use Parrot::Test tests => 22; +use Parrot::Test tests => 27; use Test::More; sub gentest($$;$$) { @@ -64,6 +64,12 @@ no match OUTPUT +output_is(gentest('a', <<'CODE'), <<'OUTPUT', 'Pattern longer than string'); + rx_literal P0, "aa", $advance +CODE +no match +OUTPUT + output_is(gentest('ba', <<'CODE'), <<'OUTPUT', 'inching through the string'); rx_literal P0, "a", $advance CODE @@ -109,6 +115,41 @@ no match OUTPUT +output_is(gentest('0123456789', <<'CODE'), <<'OUTPUT', '\d (success)'); + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance +CODE +<><0123456789><> +OUTPUT + +output_is(gentest('@?#', <<'CODE'), <<'OUTPUT', '\d (failure)'); + rx_is_d P0, $advance + rx_is_d P0, $advance + rx_is_d P0, $advance +CODE +no match +OUTPUT + +output_is(gentest(' ', <<'CODE'), <<'OUTPUT', '\s (success)'); + rx_is_s P0, $advance +CODE +<>< ><> +OUTPUT + +output_is(gentest('a', <<'CODE'), <<'OUTPUT', '\s (failure)'); + rx_is_s P0, $advance +CODE +no match +OUTPUT + output_is(gentest('a', <<'CODE'), <<'OUTPUT', 'stack (pushindex/popindex)'); rx_pushindex P0 rx_literal P0, "a", $advance