2006-02-21 20:48:30 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2006 Carl D. Worth
|
|
|
|
#
|
|
|
|
|
2007-07-03 05:52:14 +00:00
|
|
|
test_description='git ls-files test for --error-unmatch option
|
2006-02-21 20:48:30 +00:00
|
|
|
|
2007-07-03 05:52:14 +00:00
|
|
|
This test runs git ls-files --error-unmatch to ensure it correctly
|
2006-02-21 20:48:30 +00:00
|
|
|
returns an error when a non-existent path is provided on the command
|
|
|
|
line.
|
|
|
|
'
|
|
|
|
. ./test-lib.sh
|
|
|
|
|
2010-03-20 08:29:11 +00:00
|
|
|
test_expect_success 'setup' '
|
|
|
|
touch foo bar &&
|
|
|
|
git update-index --add foo bar &&
|
|
|
|
git commit -m "add foo bar"
|
|
|
|
'
|
2006-02-21 20:48:30 +00:00
|
|
|
|
2008-02-01 09:50:53 +00:00
|
|
|
test_expect_success \
|
2007-07-03 05:52:14 +00:00
|
|
|
'git ls-files --error-unmatch should fail with unmatched path.' \
|
2008-07-12 15:47:52 +00:00
|
|
|
'test_must_fail git ls-files --error-unmatch foo bar-does-not-match'
|
2006-02-21 20:48:30 +00:00
|
|
|
|
|
|
|
test_expect_success \
|
2015-08-20 13:58:55 +00:00
|
|
|
'git ls-files --error-unmatch should succeed with matched paths.' \
|
2007-07-03 05:52:14 +00:00
|
|
|
'git ls-files --error-unmatch foo bar'
|
2006-02-21 20:48:30 +00:00
|
|
|
|
|
|
|
test_done
|