-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-ls-files: Fix, document, and add test for --error-unmatch option.
Signed-off-by: Junio C Hamano <junkio@cox.net>
- Loading branch information
Carl Worth
authored and
Junio C Hamano
committed
Feb 22, 2006
1 parent
d0080b3
commit c8af25c
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2006 Carl D. Worth | ||
# | ||
|
||
test_description='git-ls-files test for --error-unmatch option | ||
This test runs git-ls-files --error-unmatch to ensure it correctly | ||
returns an error when a non-existent path is provided on the command | ||
line. | ||
' | ||
. ./test-lib.sh | ||
|
||
touch foo bar | ||
git-update-index --add foo bar | ||
git-commit -m "add foo bar" | ||
|
||
test_expect_failure \ | ||
'git-ls-files --error-unmatch should fail with unmatched path.' \ | ||
'git-ls-files --error-unmatch foo bar-does-not-match' | ||
|
||
test_expect_success \ | ||
'git-ls-files --error-unmatch should succeed eith matched paths.' \ | ||
'git-ls-files --error-unmatch foo bar' | ||
|
||
test_done | ||
1 |