aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbarenblat@gmail.com>2021-12-26 13:53:22 -0500
committerGravatar Benjamin Barenblat <bbarenblat@gmail.com>2021-12-26 14:55:31 -0500
commit4b49b1d0cc23f909d1be89cf8f816f820b343e0a (patch)
tree331616bf0cf1643e9abec6a49e2ead10e58ed0aa /scripts
parent520bbd892ada57a5c93680eae3c9d7eb691073af (diff)
Don’t hard-code escape sequences
Instead of hard-coding VT100-compatible escape sequences, parse the system terminfo database and read escape sequences from it. This is both more flexible (it should work well on more terminals) and more efficient (it won’t insert padding on terminals that don’t need it).
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_all_tests16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/run_all_tests b/scripts/run_all_tests
index a73ca23..3282475 100755
--- a/scripts/run_all_tests
+++ b/scripts/run_all_tests
@@ -16,10 +16,22 @@
set -eu -o pipefail
-readonly TESTS=(src/builtin_test src/language_test src/parser_driver_test)
+readonly TESTS=(
+ goldfishterm/internal/string_capability_test
+ goldfishterm/terminfo_test
+ src/builtin_test
+ src/language_test
+ src/parser_driver_test
+)
+readonly MANUAL_TESTS=(goldfishterm/terminfo_system_test)
cd "$(dirname "$(realpath "$0")")/.."
-ninja "${TESTS[@]}"
+ninja "${TESTS[@]}" "${MANUAL_TESTS[@]}"
for test in "${TESTS[@]}"; do
"./$test"
done
+
+echo >&2 'Running terminfo system test; failed terminals are:'
+if find /usr/share/terminfo -type f -exec basename '{}' ';' | goldfishterm/terminfo_system_test; then
+ echo >&2 'No failed terminals!'
+fi