diff options
author | Roland Walker <walker@pobox.com> | 2018-05-21 15:01:13 -0400 |
---|---|---|
committer | Jonas Fonseca <jonas.fonseca@gmail.com> | 2018-05-21 15:01:13 -0400 |
commit | 4fbfb7152fe2c24f1896c204bc67fd8caa658450 (patch) | |
tree | 7515ea7e3423ba5dcae943e04d403e270008e062 | |
parent | 877092ed53f83dd6306f3eea37655cba0d2496cb (diff) |
less hacky libreadline test (#829)
now that readline is exposed in tig --version
-rw-r--r-- | test/tools/libtest.sh | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/test/tools/libtest.sh b/test/tools/libtest.sh index 82547b17..c4597466 100644 --- a/test/tools/libtest.sh +++ b/test/tools/libtest.sh @@ -458,17 +458,11 @@ require_git_version() has_readline() { - # Test functionality, since there isn't a good way to inspect the binary. - readline_exit_status=1 - file readline_guard.script <<-EOF - :quit - EOF - - TIG_NO_DISPLAY=1 TIG_SCRIPT=readline_guard.script tig status </dev/null >/dev/null 2>/dev/null || true - test -e .tig_history && readline_exit_status=0 - rm -f -- readline_guard.script .tig_history - - return "$readline_exit_status" + if tig --version | grep readline >/dev/null 2>&1; then + return 0 + else + return 1 + fi } test_require() |