Skip to content

Commit

Permalink
less hacky libreadline test (#829)
Browse files Browse the repository at this point in the history
now that readline is exposed in tig --version
  • Loading branch information
rolandwalker authored and jonas committed May 21, 2018
1 parent 877092e commit 4fbfb71
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions test/tools/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4fbfb71

Please sign in to comment.