Merge branch 'rj/add-p-typo-reaction'
[git/gitster.git] / t / t3020-ls-files-error-unmatch.sh
blob133593d23c0e898b41f697831d4f41dcbbf54d6c
1 #!/bin/sh
3 # Copyright (c) 2006 Carl D. Worth
6 test_description='git ls-files test for --error-unmatch option
8 This test runs git ls-files --error-unmatch to ensure it correctly
9 returns an error when a non-existent path is provided on the command
10 line.
13 TEST_PASSES_SANITIZE_LEAK=true
14 . ./test-lib.sh
16 test_expect_success 'setup' '
17 touch foo bar &&
18 git update-index --add foo bar &&
19 git commit -m "add foo bar"
22 test_expect_success 'git ls-files --error-unmatch should fail with unmatched path.' '
23 test_must_fail git ls-files --error-unmatch foo bar-does-not-match
26 test_expect_success 'git ls-files --error-unmatch should succeed with matched paths.' '
27 git ls-files --error-unmatch foo bar
30 test_done