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

From: Felipe Contreras <[email-masked]>
Date: Tue, 02 May 2023 09:54:54 -0600

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