]>
Commit | Line | Data |
---|---|---|
c8af25ca CW |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2006 Carl D. Worth | |
4 | # | |
5 | ||
5be60078 | 6 | test_description='git ls-files test for --error-unmatch option |
c8af25ca | 7 | |
5be60078 | 8 | This test runs git ls-files --error-unmatch to ensure it correctly |
c8af25ca CW |
9 | returns an error when a non-existent path is provided on the command |
10 | line. | |
11 | ' | |
12 | . ./test-lib.sh | |
13 | ||
4a45f7dd BG |
14 | test_expect_success 'setup' ' |
15 | touch foo bar && | |
16 | git update-index --add foo bar && | |
17 | git commit -m "add foo bar" | |
18 | ' | |
c8af25ca | 19 | |
41ac414e | 20 | test_expect_success \ |
5be60078 | 21 | 'git ls-files --error-unmatch should fail with unmatched path.' \ |
d492b31c | 22 | 'test_must_fail git ls-files --error-unmatch foo bar-does-not-match' |
c8af25ca CW |
23 | |
24 | test_expect_success \ | |
5be60078 JH |
25 | 'git ls-files --error-unmatch should succeed eith matched paths.' \ |
26 | 'git ls-files --error-unmatch foo bar' | |
c8af25ca CW |
27 | |
28 | test_done |