test_expect_success \
'git ls-files without path restriction.' \
'git ls-files --others >output &&
- git diff output - <<EOF
+ test_cmp output - <<EOF
--
-foo
output
test_expect_success \
'git ls-files with path restriction.' \
'git ls-files --others path0 >output &&
- git diff output - <<EOF
+ test_cmp output - <<EOF
path0
EOF
'
test_expect_success \
'git ls-files with path restriction with --.' \
'git ls-files --others -- path0 >output &&
- git diff output - <<EOF
+ test_cmp output - <<EOF
path0
EOF
'
test_expect_success \
'git ls-files with path restriction with -- --.' \
'git ls-files --others -- -- >output &&
- git diff output - <<EOF
+ test_cmp output - <<EOF
--
EOF
'
test_expect_success \
'git ls-files with no path restriction.' \
'git ls-files --others -- >output &&
- git diff output - <<EOF
+ test_cmp output - <<EOF
--
-foo
output