I'm trying to set up a test harness for languages/PIR
I did the following:
1. added a file lib\Parrot\Test\PIR.pm
(there are others, like Punie.pm).
I changed this file a bit, so it uses pir.pbc as compiler (I copied
the file from Punie.pm, and changed the compiler from punie.pbc to pir.pbc)
2. I added a file languages\PIR\t\harness containing:
#! perl -w
use Parrot::Test::Harness language => 'PIR';
3. I added 1 test file "sub.t"
Now, if I run it with a deliberate error in the test file, I see that:
[...]
# '.\parrot.exe "C:\parrot\languages\PIR\t\sub_1.pir"' failed with
exit code 1
[...]
which obviously means that languages\pir.pbc is not even used.
In other words, it seems that this module PIR.pm is not used.
I could not find docs on how to set this up. Help would greatly be
appreciated.
(and I could provide a patch after that for compiler FAQ, right below
"Languages" explaining this)
Thanks,
Klaas-Jan
Turns out you have an unfortunately named language, as
language=>"PIR" forces the usage of output_is(), as the author
assumed PIR was reserved for internal testing.
This will require either an update to lib/Parrot/Test.pm, or that you
use a different language name for the language arg and module. I
recommend the latter, e.g. "PIR_PGE". You won't need to change the
language DIR or the compiled .pbc you're using.
Regards.
--
Will "Coke" Coleda
wi...@coleda.com
kjs