From bbbe508d771f6a4c65fea43343597ecfa1eb540e Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 25 Nov 2009 17:46:16 -0500 Subject: tests: rename duplicate t1009 We should avoid duplicate test numbers, since things like GIT_SKIP_TESTS consider something like t1009.5 to be unambiguous. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t1009-read-tree-sparse-checkout.sh | 150 ----------------------------------- t/t1011-read-tree-sparse-checkout.sh | 150 +++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 150 deletions(-) delete mode 100755 t/t1009-read-tree-sparse-checkout.sh create mode 100755 t/t1011-read-tree-sparse-checkout.sh (limited to 't') diff --git a/t/t1009-read-tree-sparse-checkout.sh b/t/t1009-read-tree-sparse-checkout.sh deleted file mode 100755 index 62246dbf95..0000000000 --- a/t/t1009-read-tree-sparse-checkout.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/sh - -test_description='sparse checkout tests' - -. ./test-lib.sh - -cat >expected <> init.t && - mkdir sub && - touch sub/added && - git add init.t sub/added && - git commit -m "modified and added" && - git tag top && - git rm sub/added && - git commit -m removed && - git tag removed && - git checkout top && - git ls-files --stage > result && - test_cmp expected result -' - -cat >expected.swt < result && - test_cmp expected result && - git ls-files -t > result && - test_cmp expected.swt result -' - -test_expect_success 'read-tree with .git/info/sparse-checkout but disabled' ' - echo > .git/info/sparse-checkout - git read-tree -m -u HEAD && - git ls-files -t > result && - test_cmp expected.swt result && - test -f init.t && - test -f sub/added -' - -test_expect_success 'read-tree --no-sparse-checkout with empty .git/info/sparse-checkout and enabled' ' - git config core.sparsecheckout true && - echo > .git/info/sparse-checkout && - git read-tree --no-sparse-checkout -m -u HEAD && - git ls-files -t > result && - test_cmp expected.swt result && - test -f init.t && - test -f sub/added -' - -test_expect_success 'read-tree with empty .git/info/sparse-checkout' ' - git config core.sparsecheckout true && - echo > .git/info/sparse-checkout && - test_must_fail git read-tree -m -u HEAD && - git ls-files --stage > result && - test_cmp expected result && - git ls-files -t > result && - test_cmp expected.swt result && - test -f init.t && - test -f sub/added -' - -cat >expected.swt < .git/info/sparse-checkout && - git read-tree -m -u HEAD && - git ls-files -t > result && - test_cmp expected.swt result && - test ! -f init.t && - test -f sub/added -' - -cat >expected.swt < .git/info/sparse-checkout && - echo sub >> .git/info/sparse-checkout && - git read-tree -m -u HEAD && - git ls-files -t > result && - test_cmp expected.swt result && - test ! -f init.t && - test -f sub/added -' - -cat >expected.swt < .git/info/sparse-checkout && - git read-tree -m -u HEAD && - git ls-files -t > result && - test_cmp expected.swt result && - test -f init.t && - test ! -f sub/added -' - -test_expect_success 'read-tree updates worktree, absent case' ' - echo sub/added > .git/info/sparse-checkout && - git checkout -f top && - git read-tree -m -u HEAD^ && - test ! -f init.t -' - -test_expect_success 'read-tree updates worktree, dirty case' ' - echo sub/added > .git/info/sparse-checkout && - git checkout -f top && - echo dirty > init.t && - git read-tree -m -u HEAD^ && - grep -q dirty init.t && - rm init.t -' - -test_expect_success 'read-tree removes worktree, dirty case' ' - echo init.t > .git/info/sparse-checkout && - git checkout -f top && - echo dirty > added && - git read-tree -m -u HEAD^ && - grep -q dirty added -' - -test_expect_success 'read-tree adds to worktree, absent case' ' - echo init.t > .git/info/sparse-checkout && - git checkout -f removed && - git read-tree -u -m HEAD^ && - test ! -f sub/added -' - -test_expect_success 'read-tree adds to worktree, dirty case' ' - echo init.t > .git/info/sparse-checkout && - git checkout -f removed && - mkdir sub && - echo dirty > sub/added && - git read-tree -u -m HEAD^ && - grep -q dirty sub/added -' - -test_done diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh new file mode 100755 index 0000000000..62246dbf95 --- /dev/null +++ b/t/t1011-read-tree-sparse-checkout.sh @@ -0,0 +1,150 @@ +#!/bin/sh + +test_description='sparse checkout tests' + +. ./test-lib.sh + +cat >expected <> init.t && + mkdir sub && + touch sub/added && + git add init.t sub/added && + git commit -m "modified and added" && + git tag top && + git rm sub/added && + git commit -m removed && + git tag removed && + git checkout top && + git ls-files --stage > result && + test_cmp expected result +' + +cat >expected.swt < result && + test_cmp expected result && + git ls-files -t > result && + test_cmp expected.swt result +' + +test_expect_success 'read-tree with .git/info/sparse-checkout but disabled' ' + echo > .git/info/sparse-checkout + git read-tree -m -u HEAD && + git ls-files -t > result && + test_cmp expected.swt result && + test -f init.t && + test -f sub/added +' + +test_expect_success 'read-tree --no-sparse-checkout with empty .git/info/sparse-checkout and enabled' ' + git config core.sparsecheckout true && + echo > .git/info/sparse-checkout && + git read-tree --no-sparse-checkout -m -u HEAD && + git ls-files -t > result && + test_cmp expected.swt result && + test -f init.t && + test -f sub/added +' + +test_expect_success 'read-tree with empty .git/info/sparse-checkout' ' + git config core.sparsecheckout true && + echo > .git/info/sparse-checkout && + test_must_fail git read-tree -m -u HEAD && + git ls-files --stage > result && + test_cmp expected result && + git ls-files -t > result && + test_cmp expected.swt result && + test -f init.t && + test -f sub/added +' + +cat >expected.swt < .git/info/sparse-checkout && + git read-tree -m -u HEAD && + git ls-files -t > result && + test_cmp expected.swt result && + test ! -f init.t && + test -f sub/added +' + +cat >expected.swt < .git/info/sparse-checkout && + echo sub >> .git/info/sparse-checkout && + git read-tree -m -u HEAD && + git ls-files -t > result && + test_cmp expected.swt result && + test ! -f init.t && + test -f sub/added +' + +cat >expected.swt < .git/info/sparse-checkout && + git read-tree -m -u HEAD && + git ls-files -t > result && + test_cmp expected.swt result && + test -f init.t && + test ! -f sub/added +' + +test_expect_success 'read-tree updates worktree, absent case' ' + echo sub/added > .git/info/sparse-checkout && + git checkout -f top && + git read-tree -m -u HEAD^ && + test ! -f init.t +' + +test_expect_success 'read-tree updates worktree, dirty case' ' + echo sub/added > .git/info/sparse-checkout && + git checkout -f top && + echo dirty > init.t && + git read-tree -m -u HEAD^ && + grep -q dirty init.t && + rm init.t +' + +test_expect_success 'read-tree removes worktree, dirty case' ' + echo init.t > .git/info/sparse-checkout && + git checkout -f top && + echo dirty > added && + git read-tree -m -u HEAD^ && + grep -q dirty added +' + +test_expect_success 'read-tree adds to worktree, absent case' ' + echo init.t > .git/info/sparse-checkout && + git checkout -f removed && + git read-tree -u -m HEAD^ && + test ! -f sub/added +' + +test_expect_success 'read-tree adds to worktree, dirty case' ' + echo init.t > .git/info/sparse-checkout && + git checkout -f removed && + mkdir sub && + echo dirty > sub/added && + git read-tree -u -m HEAD^ && + grep -q dirty sub/added +' + +test_done -- cgit v1.2.3