Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

Language Testing

已查看 6 次
跳至第一个未读帖子

Klaas-Jan Stol

未读,
2007年1月30日 05:03:182007/1/30
收件人 perl6-i...@perl.org
hello,

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


Will Coleda

未读,
2007年1月30日 07:24:452007/1/30
收件人 Klaas-Jan Stol、perl6-i...@perl.org
I just tried this setup in my sandbox as well.

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


Klaas-Jan Stol

未读,
2007年1月30日 07:32:022007/1/30
收件人 Will Coleda、perl6-i...@perl.org
Thanks a bunch!
It's working :-)

kjs

0 个新帖子