]> git.ipfire.org Git - thirdparty/git.git/blob - t/t6013-rev-list-reverse-parents.sh
i18n: avoid parenthesized string as array initializer
[thirdparty/git.git] / t / t6013-rev-list-reverse-parents.sh
1 #!/bin/sh
2
3 test_description='--reverse combines with --parents'
4
5 . ./test-lib.sh
6
7
8 commit () {
9 test_tick &&
10 echo $1 > foo &&
11 git add foo &&
12 git commit -m "$1"
13 }
14
15 test_expect_success 'set up --reverse example' '
16 commit one &&
17 git tag root &&
18 commit two &&
19 git checkout -b side HEAD^ &&
20 commit three &&
21 git checkout master &&
22 git merge -s ours side &&
23 commit five
24 '
25
26 test_expect_success '--reverse --parents --full-history combines correctly' '
27 git rev-list --parents --full-history master -- foo |
28 perl -e "print reverse <>" > expected &&
29 git rev-list --reverse --parents --full-history master -- foo \
30 > actual &&
31 test_cmp actual expected
32 '
33
34 test_expect_success '--boundary does too' '
35 git rev-list --boundary --parents --full-history master ^root -- foo |
36 perl -e "print reverse <>" > expected &&
37 git rev-list --boundary --reverse --parents --full-history \
38 master ^root -- foo > actual &&
39 test_cmp actual expected
40 '
41
42 test_done