]> git.draconx.ca Git - dxcommon.git/blob - t/autotest.sh
DX_C_ALIGNAS: Work around bash-5 parsing bug.
[dxcommon.git] / t / autotest.sh
1 #!/bin/sh
2 #
3 # Copyright © 2022-2023 Nick Bowler
4 #
5 # Fake autotest program for testing the autotest macros and 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 argv0=$0
12
13 outfile=
14 for arg
15 do
16   arg=${lastarg:+"$lastarg="}$arg
17   lastarg=
18
19   save_IFS=$IFS; IFS='='
20   set x $arg; shift; shift; optarg=$*
21   IFS=$save_IFS
22
23   case $arg in
24   -o|--output) lastarg=--output ;;
25   --output=*) outfile=$optarg ;;
26   esac
27 done
28
29 test x"$outfile" = x || exec 1>"$outfile"
30 echo "echo 'testsuite (mypackage)'"