From c8a950af5b65652fb41c1552b4ef17fa1840e230 Mon Sep 17 00:00:00 2001 From: mes5k Date: Mon, 24 Jan 2005 02:59:57 +0000 Subject: [PATCH] a script to compare test output --- tests/testCheck.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 tests/testCheck.sh diff --git a/tests/testCheck.sh b/tests/testCheck.sh new file mode 100755 index 0000000..ef583e0 --- /dev/null +++ b/tests/testCheck.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# +# A script to easily compare the output of old test results and new. +# +if [ "$1" == "" ] +then + echo "USAGE: testCheck.sh " +else + cmd="test$1.sh" + out="test$1.out" + $cmd + if cmp -s tmp.out $out + then + echo "$cmd OK -- output identical" + else + echo "$cmd Problem!" + echo + echo "TEST ======================================================" + echo + cat tmp.out + echo "EXPECTED ==================================================" + echo + cat $out + echo + echo "DIFF ======================================================" + echo "diff tmp.out $out" + echo "< = test(new) = tmp.out" + echo "> = expected = $out" + echo + diff tmp.out $out + echo + fi +fi