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

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

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
April 30, 2008 02:23
Subject:
Re: [PATCH] testing $/ with in memory files
Message ID:
b77c1dce0804300223s41859477m7e29fe775004e595@mail.gmail.com
2008/4/30 Bram <p5p@perl.wizbit.be>:
>  That means duplicating all the rs tests...
>
>  What about adding the if at the end of t/op/rs.t?

s/op/base/ you mean.

>  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?

Sounds easy and basic enough. Go for it.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About