difftool--helper: exit when reading a prompt answer fails
[gitweb.git] / t / t7800-difftool.sh
index dc30a514bf681dde44dea32e671632ef6f0a47a7..9cf5dc9347971438b50e2a23cbb005758106ab5e 100755 (executable)
@@ -301,6 +301,14 @@ test_expect_success PERL 'say no to the second file' '
        ! grep br2 output
 '
 
+test_expect_success PERL 'ending prompt input with EOF' '
+       git difftool -x cat branch </dev/null >output &&
+       ! grep master output &&
+       ! grep branch output &&
+       ! grep m2 output &&
+       ! grep br2 output
+'
+
 test_expect_success PERL 'difftool --tool-help' '
        git difftool --tool-help >output &&
        grep tool output