From 4b49b1d0cc23f909d1be89cf8f816f820b343e0a Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sun, 26 Dec 2021 13:53:22 -0500 Subject: Don’t hard-code escape sequences MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- scripts/run_all_tests | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'scripts/run_all_tests') 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 -- cgit v1.2.3