develooper Front page | perl.perl5.porters | Postings from April 2008

Re: [PATCH] testing $/ with in memory files

Thread Previous | Thread Next
April 30, 2008 02:19
Re: [PATCH] testing $/ with in memory files
Message ID:
Quoting Rafael Garcia-Suarez <>:

> 2008/4/27 Bram <>:
>> Inspired by: (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:

   # 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;
   close TESTFILE;

   open TESTFILE, "<", \$teststring2;
   close TESTFILE;

Would that be acceptable as well?

Kind regards,


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About