]> git.ipfire.org Git - thirdparty/git.git/blame - t/t3020-ls-files-error-unmatch.sh
The second batch
[thirdparty/git.git] / t / t3020-ls-files-error-unmatch.sh
CommitLineData
c8af25ca
CW
1#!/bin/sh
2#
3# Copyright (c) 2006 Carl D. Worth
4#
5
5be60078 6test_description='git ls-files test for --error-unmatch option
c8af25ca 7
5be60078 8This test runs git ls-files --error-unmatch to ensure it correctly
c8af25ca
CW
9returns an error when a non-existent path is provided on the command
10line.
11'
eab4ac6a
ÆAB
12
13TEST_PASSES_SANITIZE_LEAK=true
c8af25ca
CW
14. ./test-lib.sh
15
4a45f7dd
BG
16test_expect_success 'setup' '
17 touch foo bar &&
18 git update-index --add foo bar &&
19 git commit -m "add foo bar"
20'
c8af25ca 21
18337d40
LL
22test_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
24'
c8af25ca 25
18337d40
LL
26test_expect_success 'git ls-files --error-unmatch should succeed with matched paths.' '
27 git ls-files --error-unmatch foo bar
28'
c8af25ca
CW
29
30test_done