X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7502-status.sh;h=38a48b57c70a888838cfa114be843e1d4aea00d8;hb=3814c07498f87e7d27b55175ca2852fcc4cd27f4;hp=e4bfcaece0c3ac4ea4b33521e84bd7fc1c19422e;hpb=998b912927281a871e8d379e2b3a4385c775c4fe;p=git.git diff --git a/t/t7502-status.sh b/t/t7502-status.sh index e4bfcaece..38a48b57c 100755 --- a/t/t7502-status.sh +++ b/t/t7502-status.sh @@ -63,8 +63,106 @@ EOF test_expect_success 'status (2)' ' git status > output && - git diff expect output + test_cmp expect output + +' + +cat >expect <..." to unstage) +# +# new file: dir2/added +# +# Changed but not updated: +# (use "git add ..." to update what will be committed) +# +# modified: dir1/modified +# +# Untracked files not listed (use -u option to show untracked files) +EOF +test_expect_success 'status -uno' ' + mkdir dir3 && + : > dir3/untracked1 && + : > dir3/untracked2 && + git status -uno >output && + test_cmp expect output +' + +test_expect_success 'status (status.showUntrackedFiles no)' ' + git config status.showuntrackedfiles no + git status >output && + test_cmp expect output +' + +cat >expect <..." to unstage) +# +# new file: dir2/added +# +# Changed but not updated: +# (use "git add ..." to update what will be committed) +# +# modified: dir1/modified +# +# Untracked files: +# (use "git add ..." to include in what will be committed) +# +# dir1/untracked +# dir2/modified +# dir2/untracked +# dir3/ +# expect +# output +# untracked +EOF +test_expect_success 'status -unormal' ' + git status -unormal >output && + test_cmp expect output +' + +test_expect_success 'status (status.showUntrackedFiles normal)' ' + git config status.showuntrackedfiles normal + git status >output && + test_cmp expect output +' +cat >expect <..." to unstage) +# +# new file: dir2/added +# +# Changed but not updated: +# (use "git add ..." to update what will be committed) +# +# modified: dir1/modified +# +# Untracked files: +# (use "git add ..." to include in what will be committed) +# +# dir1/untracked +# dir2/modified +# dir2/untracked +# dir3/untracked1 +# dir3/untracked2 +# expect +# output +# untracked +EOF +test_expect_success 'status -uall' ' + git status -uall >output && + test_cmp expect output +' +test_expect_success 'status (status.showUntrackedFiles all)' ' + git config status.showuntrackedfiles all + git status >output && + rm -rf dir3 && + git config --unset status.showuntrackedfiles && + test_cmp expect output ' cat > expect << \EOF @@ -93,7 +191,7 @@ EOF test_expect_success 'status with relative paths' ' (cd dir1 && git status) > output && - git diff expect output + test_cmp expect output ' @@ -124,7 +222,7 @@ test_expect_success 'status without relative paths' ' git config status.relativePaths false (cd dir1 && git status) > output && - git diff expect output + test_cmp expect output '