]> git.draconx.ca Git - dxcommon.git/commitdiff
Add missing file for autotest snippet test.
authorNick Bowler <nbowler@draconx.ca>
Wed, 8 Jun 2022 01:50:06 +0000 (21:50 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 8 Jun 2022 01:52:34 +0000 (21:52 -0400)
The test for --disable-dependency-tracking depends on a mock autotest
command but I apparently failed to commit that script.

t/autotest.sh [new file with mode: 0755]

diff --git a/t/autotest.sh b/t/autotest.sh
new file mode 100755 (executable)
index 0000000..d563ab2
--- /dev/null
@@ -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"