Merge branch 'jk/http-dumb-namespaces'
[gitweb.git] / contrib / remote-helpers / test-bzr.sh
index 4d71f711a6d032acfe4c1dc92d1c308ee56b1b80..34666e1d0f60813abf65fa231dc13f2b4c080440 100755 (executable)
@@ -17,20 +17,6 @@ if ! "$PYTHON_PATH" -c 'import bzrlib'; then
        test_done
 fi
 
-cmd='
-import bzrlib
-bzrlib.initialize()
-import bzrlib.plugin
-bzrlib.plugin.load_plugins()
-import bzrlib.plugins.fastimport
-'
-
-if ! "$PYTHON_PATH" -c "$cmd"; then
-       echo "consider setting BZR_PLUGIN_PATH=$HOME/.bazaar/plugins" 1>&2
-       skip_all='skipping remote-bzr tests; bzr-fastimport not available'
-       test_done
-fi
-
 check () {
        (cd $1 &&
        git log --format='%s' -1 &&
@@ -136,7 +122,7 @@ test_expect_success 'special modes' '
   (cd gitrepo &&
   git cat-file -p HEAD:link > ../actual) &&
 
-  echo -n content > expected &&
+  printf content > expected &&
   test_cmp expected actual
 '
 
@@ -183,24 +169,30 @@ test_expect_success 'fetch utf-8 filenames' '
   mkdir -p tmp && cd tmp &&
   test_when_finished "cd .. && rm -rf tmp && LC_ALL=C" &&
 
-  export LC_ALL=en_US.UTF-8
-
+  LC_ALL=en_US.UTF-8
+  export LC_ALL
   (
   bzr init bzrrepo &&
   cd bzrrepo &&
 
-  echo test >> "áéíóú" &&
-  bzr add "áéíóú" &&
-  bzr commit -m utf-8
+  echo test >> "ærø" &&
+  bzr add "ærø" &&
+  echo test >> "ø~?" &&
+  bzr add "ø~?" &&
+  bzr commit -m add-utf-8 &&
+  echo test >> "ærø" &&
+  bzr commit -m test-utf-8 &&
+  bzr rm "ø~?" &&
+  bzr mv "ærø" "ø~?" &&
+  bzr commit -m bzr-mv-utf-8
   ) &&
 
   (
   git clone "bzr::$PWD/bzrrepo" gitrepo &&
   cd gitrepo &&
-  git ls-files > ../actual
+  git -c core.quotepath=false ls-files > ../actual
   ) &&
-
-  echo "\"\\303\\241\\303\\251\\303\\255\\303\\263\\303\\272\"" > expected &&
+  echo "ø~?" > expected &&
   test_cmp expected actual
 '
 
@@ -208,7 +200,8 @@ test_expect_success 'push utf-8 filenames' '
   mkdir -p tmp && cd tmp &&
   test_when_finished "cd .. && rm -rf tmp && LC_ALL=C" &&
 
-  export LC_ALL=en_US.UTF-8
+  LC_ALL=en_US.UTF-8
+  export LC_ALL
 
   (
   bzr init bzrrepo &&
@@ -223,15 +216,15 @@ test_expect_success 'push utf-8 filenames' '
   git clone "bzr::$PWD/bzrrepo" gitrepo &&
   cd gitrepo &&
 
-  echo test >> "áéíóú" &&
-  git add "áéíóú" &&
+  echo test >> "ærø" &&
+  git add "ærø" &&
   git commit -m utf-8 &&
 
   git push
   ) &&
 
   (cd bzrrepo && bzr ls > ../actual) &&
-  echo -e "content\náéíóú" > expected &&
+  printf "content\nærø\n" > expected &&
   test_cmp expected actual
 '