Move it to the 'test' directory so it's clear what's its purpose, and
rename it so the tests use less hacky URLs.
git-remote-testgitifyhg | 7 -------
test/git-remote-gitifyhg | 7 +++++++
test/test-lib.sh | 6 ++++--
test/test_anonymous_branches.t | 4 ++--
test/test_notes.t | 2 +-
test/test_pull.t | 2 +-
test/test_special_cases.t | 2 +-
7 files changed, 16 insertions(+), 14 deletions(-)
delete mode 100755 git-remote-testgitifyhg
create mode 100755 test/git-remote-gitifyhg
diff --git a/git-remote-testgitifyhg b/git-remote-testgitifyhg
deleted file mode 100755
index c261329..0000000
--- a/git-remote-testgitifyhg
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-#
-# This bin script is intended only for testing.
-# It will not be used by the installed egg.
-
-import gitifyhg.gitifyhg
-gitifyhg.gitifyhg.main()
diff --git a/test/git-remote-gitifyhg b/test/git-remote-gitifyhg
new file mode 100755
index 0000000..c261329
--- /dev/null
+++ b/test/git-remote-gitifyhg
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+#
+# This bin script is intended only for testing.
+# It will not be used by the installed egg.
+
+import gitifyhg.gitifyhg
+gitifyhg.gitifyhg.main()
diff --git a/test/test-lib.sh b/test/test-lib.sh
index b009392..a738efa 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+: ${SHARNESS_BUILD_DIRECTORY:=$(pwd)}
+
. ./sharness.sh
export GIT_AUTHOR_EMAIL=
git....@example.com
@@ -11,7 +13,7 @@ export GIT_PAGER=cat
export HGRCPATH="$HOME/.hgrc"
export NL='
'
-export PYTHONPATH="$SHARNESS_BUILD_DIRECTORY"
+export PYTHONPATH="$SHARNESS_BUILD_DIRECTORY/.."
make_hg_repo() {
hg init hg_repo &&
@@ -23,7 +25,7 @@ make_hg_repo() {
clone_repo() {
cd .. &&
- test_expect_code 0 git clone "testgitifyhg::hg_repo" git_clone &&
+ test_expect_code 0 git clone "gitifyhg::hg_repo" git_clone &&
cd git_clone &&
git config user.email $GIT_AUTHOR_EMAIL &&
git config
user.name "$GIT_USER"
diff --git a/test/test_anonymous_branches.t b/test/test_anonymous_branches.t
index 09f23d1..dbdf4e2 100755
--- a/test/test_anonymous_branches.t
+++ b/test/test_anonymous_branches.t
@@ -23,7 +23,7 @@ test_expect_failure 'anonymous branches dont work' '
make_hg_commit c test_file &&
cd .. &&
- git clone testgitifyhg::hg_repo git_clone 2>&1 | grep "more than one head" &&
+ git clone gitifyhg::hg_repo git_clone 2>&1 | grep "more than one head" &&
# TODO: "more than one head" is the correct response for now, but a more
# appropriate result would be to clone the extra commits, perhaps naming
@@ -47,7 +47,7 @@ test_expect_failure 'anonymous branch from named branch' '
make_hg_commit e test_file &&
cd .. &&
- git clone testgitifyhg::hg_repo git_clone 2>&1 | grep "more than one head" &&
+ git clone gitifyhg::hg_repo git_clone 2>&1 | grep "more than one head" &&
cd git_clone &&
test "`git branch -r`" = " origin/HEAD -> origin/master
origin/branches/featurebranch
diff --git a/test/test_notes.t b/test/test_notes.t
index de4ea19..5319a5f 100755
--- a/test/test_notes.t
+++ b/test/test_notes.t
@@ -54,7 +54,7 @@ test_expect_success 'pull notes rename remote' '
mkdir git_clone &&
cd git_clone &&
git init &&
- git remote add --fetch the_remote testgitifyhg::../hg_repo &&
+ git remote add --fetch the_remote gitifyhg::../hg_repo &&
git pull the_remote master &&
assert_git_messages "a" &&
cd ../hg_repo &&
diff --git a/test/test_pull.t b/test/test_pull.t
index 4367bc3..06347d5 100755
--- a/test/test_pull.t
+++ b/test/test_pull.t
@@ -35,7 +35,7 @@ test_expect_success 'pull named remote' '
mkdir git_repo &&
cd git_repo &&
git init &&
- git remote add --fetch the_remote testgitifyhg::../hg_repo
+ git remote add --fetch the_remote gitifyhg::../hg_repo
git pull the_remote master &&
assert_git_messages a &&
cd ../hg_repo &&
diff --git a/test/test_special_cases.t b/test/test_special_cases.t
index 72ec040..95d3db1 100755
--- a/test/test_special_cases.t
+++ b/test/test_special_cases.t
@@ -38,7 +38,7 @@ test_expect_success 'unicode paths' '
hg add file${SB} &&
hg commit -m ${SB} --user="$HG_USER" &&
cd .. &&
- git clone testgitifyhg::hg${SB}repo git${SB}clone &&
+ git clone gitifyhg::hg${SB}repo git${SB}clone &&
cd git${SB}clone &&
git config user.email $GIT_AUTHOR_EMAIL &&
git config
user.name "$GIT_USER"
--
1.8.3.358.g5a91d05