From: Mischa POSLAWSKY Date: Thu, 3 Oct 2019 20:49:11 +0000 (+0200) Subject: t: optional input by omitting *.in files X-Git-Tag: v1.07~27 X-Git-Url: http://git.shiar.nl/barcat.git/commitdiff_plain/865a86083719cb69f158940eaf5bad95d4cae714 t: optional input by omitting *.in files Verify t0* work correctly without dummy input. --- diff --git a/t/regress.t b/t/regress.t index 8f92ee7..2293efa 100755 --- a/t/regress.t +++ b/t/regress.t @@ -26,17 +26,18 @@ do esac done -for candidate in ${@:-t*.in} +for candidate in ${@:-t*.out} do test_count=$((test_count+1)) - file="${candidate%.in}" - test -r "$file.in" || continue - + file="${candidate%.out}" + input="$file.in" name="$(echo ${file#*-} | tr _ \ )" - set -- barcat "$file.in" + + set -- barcat + [ -r "$input" ] && set -- "$@" "$input" case "$name" in *\ -*) set -- "$@" -"${name#* -}";; esac case "$name" in - *' |'*) set -- sh -c "\$0 \$1 $3" "$@";; + *' |'*) set -- sh -c "\$0 \$1 | ${name#* |}" "$@";; *) set -- "$1" "$2" $3 esac diff --git a/t/t0001-version_--version.in b/t/t0001-version_--version.in deleted file mode 100644 index e69de29..0000000 diff --git a/t/t0002-usage_-h_|wc_-l.in b/t/t0002-usage_-h_|wc_-l.in deleted file mode 100644 index e69de29..0000000 diff --git a/t/t0003-invalid_options_-aZ_|[_$?_=_64_].in b/t/t0003-invalid_options_-aZ_|[_$?_=_64_].in deleted file mode 100644 index e69de29..0000000