Thread (25 messages) 25 messages, 9 authors, 2023-06-30

Re: [RFC PATCH 1/2] Add C TAP harness

From: Felipe Contreras <hidden>
Date: 2023-05-02 15:55:00

Phillip Wood wrote:
Unfortunately this library doesn't seem to offer any of those features. 
It does support a lazy test plan but uses atexit() so will not detect if 
the test program exits before all the tests have run.
I think there's a fundamental misunderstanding of how we use TAP.

If a program generates this output:

  1..3
  ok 1 - test 1
  ok 2 - test 2

That's clearly not complete. It shouldn't be the job a test script to check for
those cases.

If you run the programm through a TAP harness such as prove, you get:

  foo.t .. Failed 1/3 subtests 

  Test Summary Report
  -------------------
  foo.t (Wstat: 0 Tests: 2 Failed: 0)
    Parse errors: Bad plan.  You planned 3 tests but ran 2.
  Files=1, Tests=2,  0 wallclock secs ( 0.01 usr +  0.00 sys =  0.01 CPU)
  Result: FAIL

Why do we bother generaing a TAP output if we are not going to take advantage
of it?

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help