Test-More / Test-More/Test2-Harness

yath breaks Data::Section

Open
#231 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
28
Forks
30
PR merge metrics
No merged PRs in 30d

Description

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


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached bug.txt reproducer, run it directly with Perl and then through yath, and inspect line 9 where the undefined SCALAR reference is reported. Trace the difference in execution context and verify that the script completes successfully under yath with the expected test output.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
cli, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.