X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft9401-git-cvsserver-crlf.sh;h=ff6d6fb473fe0b00a4e2135395cdf89c43250a1a;hb=5febbda4e7afb4f26bed9d2dc5f9c4ceca86d2b8;hp=ed7b513f3e82706f6455bb32f4f19a5161bb0415;hpb=c444c16589f95ac22d8e3ffe603cd7f0613512ce;p=git.git diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh index ed7b513f3..ff6d6fb47 100755 --- a/t/t9401-git-cvsserver-crlf.sh +++ b/t/t9401-git-cvsserver-crlf.sh @@ -41,16 +41,16 @@ not_present() { cvs >/dev/null 2>&1 if test $? -ne 1 then - say 'skipping git-cvsserver tests, cvs not found' + skip_all='skipping git-cvsserver tests, cvs not found' test_done fi if ! test_have_prereq PERL then - say 'skipping git-cvsserver tests, perl not available' + skip_all='skipping git-cvsserver tests, perl not available' test_done fi "$PERL_PATH" -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || { - say 'skipping git-cvsserver tests, Perl SQLite interface unavailable' + skip_all='skipping git-cvsserver tests, Perl SQLite interface unavailable' test_done } @@ -70,7 +70,7 @@ test_expect_success 'setup' ' mkdir subdir && echo "Another text file" > subdir/file.h && echo "Another binary: Q (this time CR)" | q_to_cr > subdir/withCr.bin && - echo "Mixed up NUL, but marked text: Q <- there" | q_to_nul > mixedUp.c + echo "Mixed up NUL, but marked text: Q <- there" | q_to_nul > mixedUp.c && echo "Unspecified" > subdir/unspecified.other && echo "/*.bin -crlf" > .gitattributes && echo "/*.c crlf" >> .gitattributes && @@ -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 "" &&