X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft9124-git-svn-dcommit-auto-props.sh;h=d6b076f6b7de148c8d548c7a977e4f09b4be8e3b;hb=a17a9606e49dd3ad08558706f85475a694deb68b;hp=8223c5909e6ff6936cb0ccf4d0badfe43491af46;hpb=a1eb73d917e15cd97314e0a39cbe857329339a96;p=git.git diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh index 8223c5909..d6b076f6b 100755 --- a/t/t9124-git-svn-dcommit-auto-props.sh +++ b/t/t9124-git-svn-dcommit-auto-props.sh @@ -2,7 +2,7 @@ # # Copyright (c) 2008 Brad King -test_description='git-svn dcommit honors auto-props' +test_description='git svn dcommit honors auto-props' . ./lib-git-svn.sh @@ -16,26 +16,24 @@ enable-auto-props=$1 EOF } -test_expect_success 'initialize git-svn' ' +test_expect_success 'initialize git svn' ' mkdir import && ( cd import && echo foo >foo && - svn import -m "import for git-svn" . "$svnrepo" + svn_cmd import -m "import for git svn" . "$svnrepo" ) && rm -rf import && - git-svn init "$svnrepo" - git-svn fetch + git svn init "$svnrepo" + git svn fetch ' test_expect_success 'enable auto-props config' ' - cd "$gittestrepo" && mkdir user && generate_auto_props yes >user/config ' test_expect_success 'add files matching auto-props' ' - cd "$gittestrepo" && echo "#!$SHELL_PATH" >exec1.sh && chmod +x exec1.sh && echo "hello" >hello.txt && @@ -46,12 +44,10 @@ test_expect_success 'add files matching auto-props' ' ' test_expect_success 'disable auto-props config' ' - cd "$gittestrepo" && generate_auto_props no >user/config ' test_expect_success 'add files matching disabled auto-props' ' - cd "$gittestrepo" && echo "#$SHELL_PATH" >exec2.sh && chmod +x exec2.sh && echo "world" >world.txt && @@ -62,25 +58,44 @@ test_expect_success 'add files matching disabled auto-props' ' ' test_expect_success 'check resulting svn repository' ' +( mkdir work && cd work && - svn co "$svnrepo" && + svn_cmd co "$svnrepo" && cd svnrepo && # Check properties from first commit. - test "x$(svn propget svn:executable exec1.sh)" = "x*" && - test "x$(svn propget svn:mime-type exec1.sh)" = \ + test "x$(svn_cmd propget svn:executable exec1.sh)" = "x*" && + test "x$(svn_cmd propget svn:mime-type exec1.sh)" = \ "xapplication/x-shellscript" && - test "x$(svn propget svn:mime-type hello.txt)" = "xtext/plain" && - test "x$(svn propget svn:eol-style hello.txt)" = "xnative" && - test "x$(svn propget svn:mime-type bar)" = "x" && + test "x$(svn_cmd propget svn:mime-type hello.txt)" = "xtext/plain" && + test "x$(svn_cmd propget svn:eol-style hello.txt)" = "xnative" && + test "x$(svn_cmd propget svn:mime-type bar)" = "x" && # Check properties from second commit. - test "x$(svn propget svn:executable exec2.sh)" = "x*" && - test "x$(svn propget svn:mime-type exec2.sh)" = "x" && - test "x$(svn propget svn:mime-type world.txt)" = "x" && - test "x$(svn propget svn:eol-style world.txt)" = "x" && - test "x$(svn propget svn:mime-type zot)" = "x" + test "x$(svn_cmd propget svn:executable exec2.sh)" = "x*" && + test "x$(svn_cmd propget svn:mime-type exec2.sh)" = "x" && + test "x$(svn_cmd propget svn:mime-type world.txt)" = "x" && + test "x$(svn_cmd propget svn:eol-style world.txt)" = "x" && + test "x$(svn_cmd propget svn:mime-type zot)" = "x" +) +' + +test_expect_success 'check renamed file' ' + test -d user && + generate_auto_props yes > user/config && + git mv foo foo.sh && + git commit -m "foo => foo.sh" && + git svn dcommit --config-dir=user && + ( + cd work/svnrepo && + svn_cmd up && + test ! -e foo && + test -e foo.sh && + test "x$(svn_cmd propget svn:mime-type foo.sh)" = \ + "xapplication/x-shellscript" && + test "x$(svn_cmd propget svn:eol-style foo.sh)" = "xLF" + ) ' test_done