test: run testcases with POSIX absolute paths on Windows
[git.git] / t / t4208-log-magic-pathspec.sh
blob72300b5f244504540a551854cb82f81cf5391a55
1 #!/bin/sh
3 test_description='magic pathspec tests using git-log'
5 . ./test-lib.sh
7 test_expect_success 'setup' '
8 test_commit initial &&
9 test_tick &&
10 git commit --allow-empty -m empty &&
11 mkdir sub
14 test_expect_success '"git log :/" should not be ambiguous' '
15 git log :/
18 test_expect_success '"git log :/a" should be ambiguous (applied both rev and worktree)' '
19 : >a &&
20 test_must_fail git log :/a 2>error &&
21 grep ambiguous error
24 test_expect_success '"git log :/a -- " should not be ambiguous' '
25 git log :/a --
28 test_expect_success '"git log -- :/a" should not be ambiguous' '
29 git log -- :/a
32 test_expect_success '"git log :" should be ambiguous' '
33 test_must_fail git log : 2>error &&
34 grep ambiguous error
37 test_expect_success 'git log -- :' '
38 git log -- :
41 test_expect_success 'git log HEAD -- :/' '
42 cat >expected <<-EOF &&
43 24b24cf initial
44 EOF
45 (cd sub && git log --oneline HEAD -- :/ >../actual) &&
46 test_cmp expected actual
49 test_done