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