aboutsummaryrefslogtreecommitdiff
path: root/t/t4202-log.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-21 23:28:31 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-21 23:28:31 -0700
commite40b34b1ec2c91aaed5572116cd8d01afff7851f (patch)
treefe592011faace9f63915472f2ab791ca0428d74a /t/t4202-log.sh
parent613e4e5f4046ee36f40199cbaeb9f35442d24378 (diff)
parent5adba90d941cdce2aa32ff5b6f562daebef8c2e4 (diff)
downloadgit-e40b34b1ec2c91aaed5572116cd8d01afff7851f.tar.gz
git-e40b34b1ec2c91aaed5572116cd8d01afff7851f.tar.xz
Merge branch 'mm/shortopt-detached'
* mm/shortopt-detached: log: parse separate option for --glob log: parse separate options like git log --grep foo diff: parse separate options --stat-width n, --stat-name-width n diff: split off a function for --stat-* option parsing diff: parse separate options like -S foo Conflicts: revision.c
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index ead204e5c..2e5135694 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -100,13 +100,11 @@ test_expect_success 'oneline' '
test_expect_success 'diff-filter=A' '
- actual=$(git log --pretty="format:%s" --diff-filter=A HEAD) &&
- expect=$(echo fifth ; echo fourth ; echo third ; echo initial) &&
- test "$actual" = "$expect" || {
- echo Oops
- echo "Actual: $actual"
- false
- }
+ git log --pretty="format:%s" --diff-filter=A HEAD > actual &&
+ git log --pretty="format:%s" --diff-filter A HEAD > actual-separate &&
+ printf "fifth\nfourth\nthird\ninitial" > expect &&
+ test_cmp expect actual &&
+ test_cmp expect actual-separate
'
@@ -203,6 +201,13 @@ test_expect_success 'log --grep' '
test_cmp expect actual
'
+test_expect_success 'log --grep option parsing' '
+ echo second >expect &&
+ git log -1 --pretty="tformat:%s" --grep sec >actual &&
+ test_cmp expect actual &&
+ test_must_fail git log -1 --pretty="tformat:%s" --grep
+'
+
test_expect_success 'log -i --grep' '
echo Second >expect &&
git log -1 --pretty="tformat:%s" -i --grep=sec >actual &&