File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -593,6 +593,22 @@ require_git_version()
593
593
fi
594
594
}
595
595
596
+ has_readline ()
597
+ {
598
+ # Test functionality, since there isn't a good way to inspect the binary.
599
+ # bug: no timeout
600
+ readline_exit_status=1
601
+ file readline_guard.script << -EOF
602
+ :quit
603
+ EOF
604
+
605
+ TIG_NO_DISPLAY=1 TIG_SCRIPT=readline_guard.script tig status < /dev/null > /dev/null 2>&1 || true
606
+ test -e .tig_history && readline_exit_status=0
607
+ rm -f -- readline_guard.script .tig_history
608
+
609
+ return " $readline_exit_status "
610
+ }
611
+
596
612
test_require ()
597
613
{
598
614
while [ $# -gt 0 ]; do
@@ -622,6 +638,11 @@ test_require()
622
638
test_skip " The test requires a '$feature ' executable"
623
639
fi
624
640
;;
641
+ readline)
642
+ if ! has_readline; then
643
+ test_skip " The test requires a tig compiled with readline"
644
+ fi
645
+ ;;
625
646
* )
626
647
test_skip " Unknown feature requirement: $feature "
627
648
esac
You can’t perform that action at this time.
0 commit comments