5 root
=$
(dirname $
(readlink
-f "$0") )
11 [ "$#" -ge 1 ] && pat
="$1"
13 for inputf
in $
(ls tests
/*${pat}*.input
)
15 nicename
="${inputf%.input}"
16 outputf
="${nicename}.output"
17 resultf
="${tmpdir}/"$
(basename "${outputf}")
19 if [ -f "${outputf}" ]
21 printf '%s... ' "${nicename}"
22 "${root}/obj/efmt" < "${inputf}" \
24 if diff -q "${outputf}" "${resultf}" >/dev
/null
2>&1
26 printf '\033[1;34mPASS\033[0m\n'
29 printf '\033[1;31mFAIL\033[0m\n'
30 diff -u "${resultf}" "${outputf}"
33 printf '%s... ' "${nicename}"
34 printf '\033[1;33mNO STORED OUTPUT\033[0m\n'