Skip to content

Commit

Permalink
[t] Add a basic test for a passing exit code
Browse files Browse the repository at this point in the history
Trying to debug this:

(kadath)(~/git/tapir master )$ ~/svn/parrot/parrot t/harness.pir t/*.t
t/00-sanity.t ................. failed 0/0 tests, exit code = 1
t/01-parse_plan.t ............. failed 0/0 tests, exit code = 1
t/02-parse_tapstream.t ........ failed 0/0 tests, exit code = 1
t/03-parse_tapstream_error.t .. failed 0/0 tests, exit code = 1
FAILED 4 test(s) in 4/4 files
  • Loading branch information
leto committed Dec 15, 2009
1 parent 426747b commit 7ae5c81
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion t/03-parse_tapstream_error.t
Expand Up @@ -7,7 +7,7 @@
.include 'test_more.pir' .include 'test_more.pir'
.local pmc tapir, klass .local pmc tapir, klass


plan(27) plan(28)


# setup test data # setup test data
klass = newclass [ 'Tapir'; 'Parser' ] klass = newclass [ 'Tapir'; 'Parser' ]
Expand All @@ -17,8 +17,24 @@
test_parse_death_with_passing_tests(tapir) test_parse_death_with_passing_tests(tapir)
test_plumage_sanity(tapir) test_plumage_sanity(tapir)
test_exit_code(tapir) test_exit_code(tapir)
test_exit_code_pass(tapir)
.end .end


.sub test_exit_code_pass
.param pmc tapir
.local string tap
.local pmc stream
tap = <<"TAP"
1..2
ok 1 - Class of Tapir::Parser is of the correct type
ok 2 - new returns a Tapir::Parser object isa Tapir;Parser
TAP
stream = tapir.'parse_tapstream'(tap,0)
$I0 = stream.'get_exit_code'()
is($I0,0,"parse_tapstream gets passing exit code")
.end


.sub test_exit_code .sub test_exit_code
.param pmc tapir .param pmc tapir
.local string tap_error .local string tap_error
Expand Down

0 comments on commit 7ae5c81

Please sign in to comment.