aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-12-29 17:18:39 +0100
committerBoris Faure <billiob@gmail.com>2018-12-29 17:21:07 +0100
commit68787ad524a359634880b7f2e7fe820b881c40af (patch)
tree7e8ef2bd03e77014158a9894040dd2804864ac12 /tests
parenttermptyesc: handle deccara in its rectangular form + tests (diff)
downloadterminology-68787ad524a359634880b7f2e7fe820b881c40af.tar.gz
tests/termptyesc: handle DECSACE
Also regenerate tests since checksums changed due to new attribute
Diffstat (limited to '')
-rwxr-xr-xtests/run_tests.sh22
-rw-r--r--tests/tests.results4
2 files changed, 20 insertions, 6 deletions
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index d1750cf..b743251 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -7,6 +7,7 @@ RESULTS="tests.results"
TESTDIR="."
VERBOSE=0
DEBUG=0
+GENRESULTS=0
EXIT_ON_FAILURE=0
NB_TESTS=0
OK_TESTS=0
@@ -73,8 +74,9 @@ where options are:
-e, --exitonfailure Exit as soon as a test fails
Misc options:
- -v, --verbose Be verbose about what is being done.
+ -v, --verbose Be verbose about what is being done
--debug Debug tests
+ --genresults Output a results file
-h, --help Show this help.
HELP_EOF
}
@@ -99,6 +101,9 @@ while [ $# -gt 0 ]; do
-debug|--debug)
DEBUG=1
;;
+ -genresults|--genresults)
+ GENRESULTS=1
+ ;;
-t|-tytest|--tytest)
if [ -z "$value" ]; then
value=$1
@@ -138,6 +143,11 @@ fi
if [ ! -d "$TESTDIR" ]; then
die "Invalid test directory: $TESTDIR"
fi
+if [ $GENRESULTS -ne 0 ]; then
+ DEBUG=0
+ VERBOSE=0
+fi
+
if [ $DEBUG -ne 0 ]; then
cat <<EOF
@@ -160,10 +170,14 @@ while read -r TEST EXPECTED_CHECKSUM; do
if [ $DEBUG -ne 0 ]; then
printf "(got %s, expected %s) " "$TEST_CHECKSUM" "$EXPECTED_CHECKSUM"
fi
- if [ "$TEST_CHECKSUM" = "$EXPECTED_CHECKSUM" ]; then
- ok "$TEST"
+ if [ $GENRESULTS -ne 0 ]; then
+ printf "%s %s\n" "$TEST" "$TEST_CHECKSUM"
else
- failed "$TEST"
+ if [ "$TEST_CHECKSUM" = "$EXPECTED_CHECKSUM" ]; then
+ ok "$TEST"
+ else
+ failed "$TEST"
+ fi
fi
done < "$RESULTS"
summary
diff --git a/tests/tests.results b/tests/tests.results
index 5b38bdc..c46ce8a 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -41,5 +41,5 @@ decaln.sh 9c0cf4de336193bcdaed6ba6c0d6f590
decawm.sh 84321e76f07b40cf9462238ec0919dc0
decbi.sh 8153bff12a0d529cb8ba0dbff036a1ee
decfi.sh e93690447902b923d3d9d2ae72a31de4
-deccara-rectangular-no-restrict-cursor.sh 5f85e9992055397f951af7b5713fabde
-deccara-rectangular-restrict-cursor.sh c1d571a6c60a4fb06fdd81fee7c85e1c
+deccara-rectangular-no-restrict-cursor.sh 0d04ff5f4a266917528ff8d17846c18a
+deccara-rectangular-restrict-cursor.sh 9f23ac6a3423ba8bf7b8af5116e2843b