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