Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t] Add a basic test for a passing exit code

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...
commit 7ae5c81d5b6e1a7bef62688bed1d1f733a3faeb0 1 parent 426747b
@leto authored
Showing with 17 additions and 1 deletion.
  1. +17 −1 t/03-parse_tapstream_error.t
View
18 t/03-parse_tapstream_error.t
@@ -7,7 +7,7 @@
.include 'test_more.pir'
.local pmc tapir, klass
- plan(27)
+ plan(28)
# setup test data
klass = newclass [ 'Tapir'; 'Parser' ]
@@ -17,8 +17,24 @@
test_parse_death_with_passing_tests(tapir)
test_plumage_sanity(tapir)
test_exit_code(tapir)
+ test_exit_code_pass(tapir)
.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
.param pmc tapir
.local string tap_error
Please sign in to comment.
Something went wrong with that request. Please try again.