Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

Test module reports incorrect line number #3769

Closed p6rt closed 9 years ago

p6rt commented 9 years ago

Migrated from rt.perl.org#124227 (status was 'resolved')

Searchable as RT124227$

p6rt commented 9 years ago

From @tbrowder

The Test module almost always reports line 1 for every failure regardless of which test. This behavior is seen in the latest release​:

  $ perl6 -v   This is perl6 version 2015.03-48-g9746e88 built on MoarVM version 2015.03

as well as the previous release.

The behavior can be witnessed by cloning "https://github.com/tbrowder/Geo-Ellipsoid-perl6.git" locally and running​:

  $ make test

Two of many failures from one test input​:

\

# Failed test at t/02-defaults.t line 1 not ok 8 -

# Failed test at t/02-defaults.t line 1 not ok 9 -

\

-Tom

\

p6rt commented 9 years ago

From @drforr

The Test module appears to be reporting failure at the wrong line number.

Test file - Note the test that will fail is at line 8, the bottom of the file​: --cut here-- use v6;

use Test;

plan 2;

ok 1; ok 0; --cut here--

Test output - Note 'line 1' should be 'line 8'. --cut here-- 1..2 ok 1 - not ok 2 -

# Failed test at test.t line 1 # Looks like you failed 1 tests of 2 --cut here--

p6rt commented 9 years ago

From @perlpilot

Seems to be fixed by 3a8ecbc92066ce27d4a705339a7ed59e44c4e2b6

-Scott

On Wed Apr 01 13​:22​:51 2015, drforr@​pobox.com wrote​:

The Test module appears to be reporting failure at the wrong line number.

Test file - Note the test that will fail is at line 8, the bottom of the file​: --cut here-- use v6;

use Test;

plan 2;

ok 1; ok 0; --cut here--

Test output - Note 'line 1' should be 'line 8'. --cut here-- 1..2 ok 1 - not ok 2 -

# Failed test at test.t line 1 # Looks like you failed 1 tests of 2 --cut here--

-- perlpilot

p6rt commented 9 years ago

The RT System itself - Status changed from 'new' to 'open'

p6rt commented 9 years ago

@perlpilot - Status changed from 'open' to 'resolved'

p6rt commented 9 years ago

From @coke

Re-opening, marking test needed.

-- Will "Coke" Coleda

p6rt commented 9 years ago

From @coke

Re-opening, marking test needed.

-- Will "Coke" Coleda

p6rt commented 9 years ago

@coke - Status changed from 'resolved' to 'open'

p6rt commented 9 years ago

From @usev6

I added some tests to S24-testing/line-numbers.t with commit https://github.com/perl6/roast/commit/4317b37e35.

This new test file is not included in t/spectest.data in Rakudo, yet, so I'm leaving this ticket open.

p6rt commented 9 years ago

From @usev6

I added some tests to S24-testing/line-numbers.t with commit https://github.com/perl6/roast/commit/4317b37e35.

This new test file is not included in t/spectest.data in Rakudo, yet, so I'm leaving this ticket open.

p6rt commented 9 years ago

From @coke

On Wed Apr 08 08​:28​:46 2015, bartolin@​gmx.de wrote​:

I added some tests to S24-testing/line-numbers.t with commit https://github.com/perl6/roast/commit/4317b37e35.

This new test file is not included in t/spectest.data in Rakudo, yet, so I'm leaving this ticket open.

That test passes, added to t/spectest.data

Closing ticket.

-- Will "Coke" Coleda

p6rt commented 9 years ago

@coke - Status changed from 'open' to 'resolved'