From ed55d48727cb9a71ac8257f6650c2dc42a5c9a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Tue, 10 Nov 2020 15:59:14 +0100 Subject: [PATCH] cmdlineTests.sh: Fix buggy calculation of the number of input files --- test/cmdlineTests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index d0b6ef531..aa70e6d47 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -256,11 +256,11 @@ printTask "Running general commandline tests..." do printTask " - ${tdir}" - # Strip trailing slash from $tdir. `find` on MacOS X won't strip it and will produce double slashes. + # Strip trailing slash from $tdir. tdir=$(basename "${tdir}") - inputFiles="$(find "${tdir}" -name 'input.*' -type f -exec printf "%s\n" "{}" \;)" - inputCount="$(echo "${inputFiles}" | wc -l)" + inputFiles="$(ls -1 ${tdir}/input.* 2> /dev/null || true)" + inputCount="$(echo ${inputFiles} | wc -w)" if (( ${inputCount} > 1 )) then printError "Ambiguous input. Found input files in multiple formats:"