Skip to content

Commit

Permalink
tests: use "git xyzzy" form (t7000 - t7199)
Browse files Browse the repository at this point in the history
Converts tests between t7001-t7103.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nanako Shiraishi authored and Junio C Hamano committed Sep 3, 2008
1 parent 3604e7c commit d592b31
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 183 deletions.
12 changes: 6 additions & 6 deletions t/t7001-mv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test_expect_success \
'mkdir path0 path1 &&
cp ../../COPYING path0/COPYING &&
git add path0/COPYING &&
git-commit -m add -a'
git commit -m add -a'

test_expect_success \
'moving the file out of subdirectory' \
Expand All @@ -17,7 +17,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
'commiting the change' \
'cd .. && git-commit -m move-out -a'
'cd .. && git commit -m move-out -a'

test_expect_success \
'checking the commit' \
Expand All @@ -31,7 +31,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
'commiting the change' \
'cd .. && git-commit -m move-in -a'
'cd .. && git commit -m move-in -a'

test_expect_success \
'checking the commit' \
Expand All @@ -42,15 +42,15 @@ test_expect_success \
'adding another file' \
'cp ../../README path0/README &&
git add path0/README &&
git-commit -m add2 -a'
git commit -m add2 -a'

test_expect_success \
'moving whole subdirectory' \
'git mv path0 path2'

test_expect_success \
'commiting the change' \
'git-commit -m dir-move -a'
'git commit -m dir-move -a'

test_expect_success \
'checking the commit' \
Expand All @@ -69,7 +69,7 @@ test_expect_success \

test_expect_success \
'commiting the change' \
'git-commit -m dir-move -a'
'git commit -m dir-move -a'

test_expect_success \
'checking the commit' \
Expand Down
22 changes: 11 additions & 11 deletions t/t7003-filter-branch.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

test_description='git-filter-branch'
test_description='git filter-branch'
. ./test-lib.sh

make_commit () {
Expand Down Expand Up @@ -32,22 +32,22 @@ test_expect_success 'setup' '
H=$(git rev-parse H)

test_expect_success 'rewrite identically' '
git-filter-branch branch
git filter-branch branch
'
test_expect_success 'result is really identical' '
test $H = $(git rev-parse HEAD)
'

test_expect_success 'rewrite bare repository identically' '
(git config core.bare true && cd .git && git-filter-branch branch)
(git config core.bare true && cd .git && git filter-branch branch)
'
git config core.bare false
test_expect_success 'result is really identical' '
test $H = $(git rev-parse HEAD)
'

test_expect_success 'rewrite, renaming a specific file' '
git-filter-branch -f --tree-filter "mv d doh || :" HEAD
git filter-branch -f --tree-filter "mv d doh || :" HEAD
'

test_expect_success 'test that the file was renamed' '
Expand All @@ -58,7 +58,7 @@ test_expect_success 'test that the file was renamed' '
'

test_expect_success 'rewrite, renaming a specific directory' '
git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD
git filter-branch -f --tree-filter "mv dir diroh || :" HEAD
'

test_expect_success 'test that the directory was renamed' '
Expand All @@ -73,7 +73,7 @@ test_expect_success 'test that the directory was renamed' '
git tag oldD HEAD~4
test_expect_success 'rewrite one branch, keeping a side branch' '
git branch modD oldD &&
git-filter-branch -f --tree-filter "mv b boh || :" D..modD
git filter-branch -f --tree-filter "mv b boh || :" D..modD
'

test_expect_success 'common ancestor is still common (unchanged)' '
Expand All @@ -96,7 +96,7 @@ test_expect_success 'filter subdirectory only' '
test_tick &&
git commit -m "again not subdir" &&
git branch sub &&
git-filter-branch -f --subdirectory-filter subdir refs/heads/sub
git filter-branch -f --subdirectory-filter subdir refs/heads/sub
'

test_expect_success 'subdirectory filter result looks okay' '
Expand All @@ -120,7 +120,7 @@ test_expect_success 'more setup' '

test_expect_success 'use index-filter to move into a subdirectory' '
git branch directorymoved &&
git-filter-branch -f --index-filter \
git filter-branch -f --index-filter \
"git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
git update-index --index-info &&
Expand All @@ -129,7 +129,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '

test_expect_success 'stops when msg filter fails' '
old=$(git rev-parse HEAD) &&
test_must_fail git-filter-branch -f --msg-filter false HEAD &&
test_must_fail git filter-branch -f --msg-filter false HEAD &&
test $old = $(git rev-parse HEAD) &&
rm -rf .git-rewrite
'
Expand All @@ -140,7 +140,7 @@ test_expect_success 'author information is preserved' '
test_tick &&
GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips &&
git branch preserved-author &&
git-filter-branch -f --msg-filter "cat; \
git filter-branch -f --msg-filter "cat; \
test \$GIT_COMMIT != $(git rev-parse master) || \
echo Hallo" \
preserved-author &&
Expand All @@ -152,7 +152,7 @@ test_expect_success "remove a certain author's commits" '
test_tick &&
git commit -m i i &&
git branch removed-author &&
git-filter-branch -f --commit-filter "\
git filter-branch -f --commit-filter "\
if [ \"\$GIT_AUTHOR_NAME\" = \"B V Uips\" ];\
then\
skip_commit \"\$@\";
Expand Down
Loading

0 comments on commit d592b31

Please sign in to comment.