Test-More / Test2-Harness

Alternative to Test::Harness
Other
23 stars 26 forks source link

yath can't always handle mixed taint tests #252

Open toddr opened 2 years ago

toddr commented 2 years ago

t/aaaaaaaaaaaaaaaa.t

#!/usr/bin/perl -T

print "1..1\n";
print "not " unless ${^TAINT};
print "ok - perl is in taint mode\n";

t/aaaaaaaaaaaaaaaa_b.t

#!/usr/bin/perl

print "1..1\n";
print "not " if ${^TAINT};
print "ok - perl is NOT in taint mode\n";
$>prove  t/aaa*.t  
t/aaaaaaaaaaaaaaaa_b.t .. ok   
t/aaaaaaaaaaaaaaaa.t .... ok   
All tests successful.
Files=2, Tests=2,  0 wallclock secs ( 0.02 usr +  0.01 sys =  0.03 CPU)
Result: PASS
$>yath test t/aaa*.t          
( PASSED )  job  1    t/aaaaaaaaaaaaaaaa.t
[  FAIL  ]  job  2  + perl is NOT in taint mode
( FAILED )  job  2    t/aaaaaaaaaaaaaaaa_b.t
< REASON >  job  2    Assertion failures were encountered (Count: 1)

The following jobs failed:
+--------------------------------------+------------------------+
| Job ID                               | Test File              |
+--------------------------------------+------------------------+
| 4DC99250-02FB-11ED-9D0E-330477E8B6D3 | t/aaaaaaaaaaaaaaaa_b.t |
+--------------------------------------+------------------------+

                                Yath Result Summary
-----------------------------------------------------------------------------------
     Fail Count: 1
     File Count: 2
Assertion Count: 2
      Wall Time: 0.62 seconds
       CPU Time: 0.94 seconds (usr: 0.31s | sys: 0.05s | cusr: 0.49s | csys: 0.09s)
      CPU Usage: 151%
    -->  Result: FAILED  <--

What's Funky about all of this is that when I named the 2 tests t/a.t and t/b.t, yath didn't have trouble so there's some sort of grouping going on that is causing problems.

No amount of # HARNESS... directives could make this problem go away :(