diff options
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-x | t/t4202-log.sh | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 71be59d446..a343bf6c62 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -72,9 +72,9 @@ cat > expect << EOF commit. EOF -test_expect_success 'format %w(12,1,2)' ' +test_expect_success 'format %w(11,1,2)' ' - git log -2 --format="%w(12,1,2)This is the %s commit." > actual && + git log -2 --format="%w(11,1,2)This is the %s commit." > actual && test_cmp expect actual ' @@ -178,11 +178,21 @@ test_expect_success 'git log --no-walk <commits> sorts by commit time' ' test_cmp expect actual ' +test_expect_success 'git log --no-walk=sorted <commits> sorts by commit time' ' + git log --no-walk=sorted --oneline 5d31159 804a787 394ef78 > actual && + test_cmp expect actual +' + cat > expect << EOF 5d31159 fourth 804a787 sixth 394ef78 fifth EOF +test_expect_success 'git log --no-walk=unsorted <commits> leaves list of commits as given' ' + git log --no-walk=unsorted --oneline 5d31159 804a787 394ef78 > actual && + test_cmp expect actual +' + test_expect_success 'git show <commits> leaves list of commits as given' ' git show --oneline -s 5d31159 804a787 394ef78 > actual && test_cmp expect actual @@ -220,6 +230,12 @@ test_expect_success 'log --grep -i' ' test_cmp expect actual ' +test_expect_success 'log -F -E --grep=<ere> uses ere' ' + echo second >expect && + git log -1 --pretty="tformat:%s" -F -E --grep=s.c.nd >actual && + test_cmp expect actual +' + cat > expect <<EOF * Second * sixth @@ -803,7 +819,14 @@ sanitize_output () { test_expect_success 'log --graph with diff and stats' ' git log --graph --pretty=short --stat -p >actual && sanitize_output >actual.sanitized <actual && - test_cmp expect actual.sanitized + test_i18ncmp expect actual.sanitized +' + +test_expect_success 'dotdot is a parent directory' ' + mkdir -p a/b && + ( echo sixth && echo fifth ) >expect && + ( cd a/b && git log --format=%s .. ) >actual && + test_cmp expect actual ' test_done |