]> git.draconx.ca Git - dxcommon.git/blob - t/tapcheck.sh
DX_C_ALIGNAS: Work around bash-5 parsing bug.
[dxcommon.git] / t / tapcheck.sh
1 #!/bin/sh
2 #
3 # Copyright © 2024 Nick Bowler
4 #
5 # Fake TAP test program for testing the autotest snippets.
6 #
7 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
8 # This is free software: you are free to do what the fuck you want to.
9 # There is NO WARRANTY, to the extent permitted by law.
10
11 total=$1; shift
12 pass=0
13 seq=0
14
15 echo "1..$total"
16 for arg
17 do
18   seq=`expr 1 + $seq`
19   if eval "$arg" >/dev/null 2>&1; then
20     echo "ok $seq"
21     pass=`expr 1 + $pass`
22   else
23     echo "not ok $seq"
24   fi
25 done
26
27 test $pass -eq $total