Wednesday, July 10, 2019

zug.tap updated with example about how to run dlang TAP tests with Perl's prove

What is "prove": prove on perldoc.perl.org

zug.tap is my implementation of a TAP producer in dlang zug.tap in the official Dub repo

contents of .proverc:


-e '/usr/bin/rdmd -I./source/ -I../../source/'
--ext '.d'


all options in the command line:

prove -e '/usr/bin/rdmd -I./source/ -I../../source/' --ext '.d' -v



emilper@home ~/work/zug_project_dlang/zug-tap/examples/run_with_Perl5_prove $ prove
t/t0001_tests_pass.d ................. ok
t/t0002_tests_fail.d ................. Failed 5/5 subtests
t/t0003_tests_some_fail_some_pass.d .. Failed 2/5 subtests

Test Summary Report
-------------------
t/t0002_tests_fail.d (Wstat: 0 Tests: 5 Failed: 5)
Failed tests: 1-5
t/t0003_tests_some_fail_some_pass.d (Wstat: 0 Tests: 5 Failed: 2)
Failed tests: 4-5
Files=3, Tests=15, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.02 cusr 0.00 csys = 0.04 CPU)
Result: FAIL
emilper@home ~/work/zug_project_dlang/zug-tap/examples/run_with_Perl5_prove $ prove -v
t/t0001_tests_pass.d .................
1..5
ok 1 should pass 1
ok 2 should pass 2
ok 3 should pass 3
ok 4 should pass 4
ok 5 should pass 5
ok
t/t0002_tests_fail.d .................
1..5
not ok 1 should fail 1
not ok 2 should fail 2
not ok 3 should fail 3
not ok 4 should fail 4
not ok 5 should fail 5
Failed 5/5 subtests
t/t0003_tests_some_fail_some_pass.d ..
1..5
ok 1 should pass 1
ok 2 should pass 2
ok 3 should pass 3
not ok 4 should fail 4
not ok 5 should fail 5
Failed 2/5 subtests

Test Summary Report
-------------------
t/t0002_tests_fail.d (Wstat: 0 Tests: 5 Failed: 5)
Failed tests: 1-5
t/t0003_tests_some_fail_some_pass.d (Wstat: 0 Tests: 5 Failed: 2)
Failed tests: 4-5
Files=3, Tests=15, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.01 cusr 0.01 csys = 0.05 CPU)
Result: FAIL

No comments:

Post a Comment