Test-More / Test2-Harness

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

yath breaks Data::Section #231

Open djerius opened 3 years ago

djerius commented 3 years ago
 $ yath --version

** Defaulting to the 'test' command **

Yath version: 1.000063

Extended Version Info
+----------------------------+----------+
| COMPONENT                  | VERSION  |
+----------------------------+----------+
| perl                       | v5.30.0  |
| App::Yath                  | 1.000063 |
| Test2::API                 | 1.302183 |
| Test2::Suite               | 0.000141 |
| Test::Builder              | 1.302183 |
| App::Yath::Plugin::Git     | 1.000063 |
| App::Yath::Plugin::Notify  | 1.000063 |
| App::Yath::Plugin::SysInfo | 1.000063 |
| App::Yath::Plugin::YathUI  | 1.000063 |
+----------------------------+----------+

The attached script bug.txt runs via 'perl bug.pl' with the appropriate output:

perl bug.txt
# Seeded srand with seed '20210825' from local date.
ok 1
1..1

but under yath, one gets this:

$ yath bug.txt

** Defaulting to the 'test' command **

( STDERR )  job  1    Can't use an undefined value as a SCALAR reference at bug.txt line 9.
( FAILED )  job  1    bug.txt
< REASON >  job  1    Test script returned error (Err: 2)
< REASON >  job  1    No plan was declared, and no assertions were made.

The following jobs failed:
+--------------------------------------+-----------+
| Job ID                               | Test File |
+--------------------------------------+-----------+
| C48B163E-0617-11EC-9AB7-F21ADF6164F0 | bug.txt   |
+--------------------------------------+-----------+

                                Yath Result Summary

-----------------------------------------------------------------------------------
     Fail Count: 1
     File Count: 1
Assertion Count: 0
      Wall Time: 0.52 seconds
       CPU Time: 0.78 seconds (usr: 0.21s | sys: 0.03s | cusr: 0.47s | csys: 0.07s)
      CPU Usage: 151%
    -->  Result: FAILED  <--