X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=t%2Ft0008-ignores.sh;h=c03f155a357446338fa831e061dc58d8e5f4c657;hb=b5cc90f548375fa8d5ae78a2879eabae78f19ae4;hp=d27f438bf410d06f37ec76a6ce040316218a8138;hpb=f7231934dc7ec05ec0d13f8d957585c6045b79d6;p=platform%2Fupstream%2Fgit.git diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index d27f438..c03f155 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -307,7 +307,7 @@ test_expect_success_multi 'needs work tree' '' ' cd .git && test_check_ignore "foo" 128 ) && - stderr_contains "fatal: This operation must be run in a work tree" + stderr_contains "fatal: this operation must be run in a work tree" ' ############################################################################ @@ -775,6 +775,26 @@ test_expect_success PIPE 'streaming support for --stdin' ' echo "$response" | grep "^:: two" ' +test_expect_success 'existing file and directory' ' + test_when_finished "rm one" && + test_when_finished "rmdir top-level-dir" && + >one && + mkdir top-level-dir && + git check-ignore one top-level-dir >actual && + grep one actual && + grep top-level-dir actual +' + +test_expect_success 'existing directory and file' ' + test_when_finished "rm one" && + test_when_finished "rmdir top-level-dir" && + >one && + mkdir top-level-dir && + git check-ignore top-level-dir one >actual && + grep one actual && + grep top-level-dir actual +' + ############################################################################ # # test whitespace handling