Quoting Rafael Garcia-Suarez <rgarciasuarez@gmail.com>:
> 2008/4/27 Bram <p5p@perl.wizbit.be>:
>> Inspired by: http://rt.perl.org/rt3/Public/Bug/Display.html?id=44833 (fixed
>> somewhere between 5.8.7 and 5.8.8)
>>
>> But I don't think test were added for it.
>> Attached is a patch for t/base/rs.t. (I hope this is the correct file to
>> test it...)
>
> No, it's not, sorry :)
>
> In-memory files necessitate PerlIO::via::scalar, thus a perl with
> perlio and dynaloading enabled. miniperl won't be able to run this
> test, which is not good for a test in base. I suggest a new test file
> in t/op, with all tests skipped if $ENV{PERL_CORE_MINITEST} is true.
>
That means duplicating all the rs tests...
What about adding the if at the end of t/op/rs.t?
That is:
if ($ENV{PERL_CORE_MINITESTS) {
# skip tests
for ($count .. $number_of_tests) {
print "ok $_ # skipped";
}
}
else {
# Test if a file in memory behaves the same as a real file (=
re-run the test with a file in memory)
open TESTFILE, "<", \$teststring;
test_string(*TESTFILE);
close TESTFILE;
open TESTFILE, "<", \$teststring2;
test_record(*TESTFILE);
close TESTFILE;
}
Would that be acceptable as well?
Kind regards,
Bram
Thread Previous
|
Thread Next