diff options
Diffstat (limited to 't/t9401-git-cvsserver-crlf.sh')
-rwxr-xr-x | t/t9401-git-cvsserver-crlf.sh | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh index 925bd0fbed..1bbfd824e5 100755 --- a/t/t9401-git-cvsserver-crlf.sh +++ b/t/t9401-git-cvsserver-crlf.sh @@ -129,21 +129,22 @@ test_expect_success 'cvs co (use attributes)' ' ' test_expect_success 'adding files' ' - cd cvswork/subdir && + (cd cvswork && + (cd subdir && echo "more text" > src.c && GIT_CONFIG="$git_config" cvs -Q add src.c >cvs.log 2>&1 && marked_as . src.c "" && - echo "psuedo-binary" > temp.bin && - cd .. && + echo "psuedo-binary" > temp.bin + ) && GIT_CONFIG="$git_config" cvs -Q add subdir/temp.bin >cvs.log 2>&1 && marked_as subdir temp.bin "-kb" && cd subdir && GIT_CONFIG="$git_config" cvs -Q ci -m "adding files" >cvs.log 2>&1 && marked_as . temp.bin "-kb" && marked_as . src.c "" + ) ' -cd "$WORKDIR" test_expect_success 'updating' ' git pull gitcvs.git && echo 'hi' > subdir/newfile.bin && @@ -153,9 +154,9 @@ test_expect_success 'updating' ' git add subdir/newfile.bin subdir/file.h subdir/newfile.c binfile.bin && git commit -q -m "Add and change some files" && git push gitcvs.git >/dev/null && - cd cvswork && - GIT_CONFIG="$git_config" cvs -Q update && - cd .. && + (cd cvswork && + GIT_CONFIG="$git_config" cvs -Q update + ) && marked_as cvswork textfile.c "" && marked_as cvswork binfile.bin -kb && marked_as cvswork .gitattributes "" && @@ -233,35 +234,35 @@ test_expect_success 'cvs co another copy (guess)' ' ' test_expect_success 'add text (guess)' ' - cd cvswork && + (cd cvswork && echo "simpleText" > simpleText.c && - GIT_CONFIG="$git_config" cvs -Q add simpleText.c && - cd .. && + GIT_CONFIG="$git_config" cvs -Q add simpleText.c + ) && marked_as cvswork simpleText.c "" ' test_expect_success 'add bin (guess)' ' - cd cvswork && + (cd cvswork && echo "simpleBin: NUL: Q <- there" | q_to_nul > simpleBin.bin && - GIT_CONFIG="$git_config" cvs -Q add simpleBin.bin && - cd .. && + GIT_CONFIG="$git_config" cvs -Q add simpleBin.bin + ) && marked_as cvswork simpleBin.bin -kb ' test_expect_success 'remove files (guess)' ' - cd cvswork && + (cd cvswork && GIT_CONFIG="$git_config" cvs -Q rm -f subdir/file.h && - cd subdir && - GIT_CONFIG="$git_config" cvs -Q rm -f withCr.bin && - cd ../.. && + (cd subdir && + GIT_CONFIG="$git_config" cvs -Q rm -f withCr.bin + )) && marked_as cvswork/subdir withCr.bin -kb && marked_as cvswork/subdir file.h "" ' test_expect_success 'cvs ci (guess)' ' - cd cvswork && - GIT_CONFIG="$git_config" cvs -Q ci -m "add/rm files" >cvs.log 2>&1 && - cd .. && + (cd cvswork && + GIT_CONFIG="$git_config" cvs -Q ci -m "add/rm files" >cvs.log 2>&1 + ) && marked_as cvswork textfile.c "" && marked_as cvswork binfile.bin -kb && marked_as cvswork .gitattributes "" && @@ -278,9 +279,9 @@ test_expect_success 'cvs ci (guess)' ' ' test_expect_success 'update subdir of other copy (guess)' ' - cd cvswork2/subdir && - GIT_CONFIG="$git_config" cvs -Q update && - cd ../.. && + (cd cvswork2/subdir && + GIT_CONFIG="$git_config" cvs -Q update + ) && marked_as cvswork2 textfile.c "" && marked_as cvswork2 binfile.bin -kb && marked_as cvswork2 .gitattributes "" && @@ -304,11 +305,11 @@ test_expect_success 'update/merge full other copy (guess)' ' git add multilineTxt.c && git commit -q -m "modify multiline file" >> "${WORKDIR}/marked.log" && git push gitcvs.git >/dev/null && - cd cvswork2 && + (cd cvswork2 && sed "s/1/replaced_1/" < multilineTxt.c > ml.temp && mv ml.temp multilineTxt.c && - GIT_CONFIG="$git_config" cvs update > cvs.log 2>&1 && - cd .. && + GIT_CONFIG="$git_config" cvs update > cvs.log 2>&1 + ) && marked_as cvswork2 textfile.c "" && marked_as cvswork2 binfile.bin -kb && marked_as cvswork2 .gitattributes "" && |