summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3bdfd44)
raw | patch | inline | side by side (parent: 3bdfd44)
author | David Aguilar <davvid@gmail.com> | |
Fri, 15 Jan 2010 22:03:42 +0000 (14:03 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 15 Jan 2010 23:04:20 +0000 (15:04 -0800) |
Instead of running 'grep', 'echo', and 'wc' we simply compare
git-difftool's output against a known good value.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-difftool's output against a known good value.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7800-difftool.sh | patch | blob | history |
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 8ee186a5fbda8b52cf3dd817a76f2f560505a253..1d9e07b0d84347be4a6bbd5d8b766f20fede1786 100755 (executable)
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
test_done
fi
+LF='
+'
+
remove_config_vars()
{
# Unset all config variables used by git-difftool
restore_test_defaults
'
-test_expect_success 'difftool --extcmd=...' '
+test_expect_success 'difftool --extcmd=cat' '
diff=$(git difftool --no-prompt --extcmd=cat branch) &&
+ test "$diff" = branch"$LF"master
- lines=$(echo "$diff" | wc -l) &&
- test "$lines" -eq 2 &&
- lines=$(echo "$diff" | grep master | wc -l) &&
- test "$lines" -eq 1 &&
- lines=$(echo "$diff" | grep branch | wc -l) &&
- test "$lines" -eq 1 &&
- restore_test_defaults
'
test_done