Patrick R. Michaud wrote:

I'm getting errors from the test script itself, there are lines such as

# 65: ^ abc     y       $&
p6rule_like('abc', '^', qr/0: <\Q\E @/, 're_tests 35/$0 (#35)');
# 66: $ abc     y       $&
p6rule_like('abc', '$', qr/0: <\Q\E @/, 're_tests 36/$0 (#36)');

which cause my test script to produce...

$ perl t/harness t/p6rules/re_tests.t t/p6rules/re_tests....syntax error at t/p6rules/re_tests.t line 106, near "0: <\Q\E @"
syntax error at t/p6rules/re_tests.t line 108, near "0: <\Q\E @"
syntax error at t/p6rules/re_tests.t line 236, near "1: <\Q\E @"
> ...
>
I suppose the problem could be with my perl installation (5.8.0, RH9)

I don't get those errors with 5.8.3, SuSe 9.1 Personal
If those are caused by '@/' which seems a bit like array, then it would be easily fixed by addind space between @ and /.



Other 'special' syntax which I invented was for tests which only test a position, not value:


# 131: ()ef     def     y       $-[0]   1
# 132: ()ef     def     y       $+[0]   3 # SKIP
p6rule_like('def', '()ef', qr/0: <.* @ 1>/, 're_tests 97/$0 (#98)');
# 133: ()ef     def     y       $-[1]   1
# 134: ()ef     def     y       $+[1]   1 # SKIP
p6rule_like('def', '()ef', qr/1: <.* @ 1>/, 're_tests 98/$1 (#99)');

> Also, the PGE test harness itself isn't sacred -- if there are
> functions or other features we could add to make this sort of testing
> easier, I'm all for it.

Currently the script is written in such a way that it's trivial to output tests in different syntax, should that be changed.

I was wondering if it would make sense to add the original 're_tests' file to parrot distribution, with a script which autogenerates 're_tests.t' from it. This way it would be possible to update the script if testing-format is changed, or if some bigger mistakes are seen.

Of course small errors in 're_tests.t' file could be fixed manually, but if testing-format it changed, then those changes would be lost when file was autogenerated again.

--
Markus Laire
<Jam. 1:5-6>

Reply via email to