From: Nick Bowler Date: Wed, 8 Jun 2022 01:50:06 +0000 (-0400) Subject: Add missing file for autotest snippet test. X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/commitdiff_plain/8a97fc3dfec42e03f72b528b3cfc48136ab6690d Add missing file for autotest snippet test. The test for --disable-dependency-tracking depends on a mock autotest command but I apparently failed to commit that script. --- diff --git a/t/autotest.sh b/t/autotest.sh new file mode 100755 index 0000000..d563ab2 --- /dev/null +++ b/t/autotest.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Copyright © 2022 Nick Bowler +# +# Fake autotest program for testing the autotest snippets. +# +# License WTFPL2: Do What The Fuck You Want To Public License, version 2. +# This is free software: you are free to do what the fuck you want to. +# There is NO WARRANTY, to the extent permitted by law. + +argv0=$0 + +outfile= +for arg +do + arg=${lastarg:+"$lastarg="}$arg + lastarg= + + save_IFS=$IFS; IFS='=' + set x $arg; shift; shift; optarg=$* + IFS=$save_IFS + + case $arg in + -o|--output) lastarg=--output ;; + --output=*) outfile=$optarg ;; + esac +done + +test x"$outfile" = x || exec 1>"$outfile"