Clean-up unit-tests
authorTony Duckles <tony@nynim.org>
Sat, 13 Oct 2012 16:53:01 +0000 (09:53 -0700)
committerTony Duckles <tony@nynim.org>
Mon, 15 Oct 2012 04:00:45 +0000 (23:00 -0500)
* Move to a stricter unit-test naming convention:
  * t1xxx-*.sh are the svnreplay tests.
  * t2xxx-*.sh are the svnancest tests.
* Support multi-jobbing unit-tests.  Make all the unit-tests
  multi-job safe, e.g. use unique repo's and wc's for each test.
* Ensure all test logic is run via assert's.
* Introduce "prove" Makefile target for unit-tests, to allow
  running all the tests multi-jobbed via prove.

16 files changed:
tests/Makefile
tests/diff-repo.sh
tests/replay-lib.sh [changed mode: 0755->0644]
tests/t0001-diff-repo.sh [deleted file]
tests/t0100-diff-repo.sh [new file with mode: 0755]
tests/t0100-replay-all.sh [deleted file]
tests/t0101-replay-trunk.sh [deleted file]
tests/t0102-replay-branch.sh [deleted file]
tests/t0103-replay-beforecommit.sh [deleted file]
tests/t1100-replay-all.sh [new file with mode: 0755]
tests/t1101-replay-trunk.sh [new file with mode: 0755]
tests/t1102-replay-branch.sh [new file with mode: 0755]
tests/t1200-replay-beforecommit.sh [new file with mode: 0755]
tests/t1200/before-commit.sh [moved from tests/t0103/before-commit.sh with 100% similarity]
tests/test-lib-functions.sh [changed mode: 0755->0644]
tests/test-lib.sh [changed mode: 0755->0644]

index eb7deb4e9d34b3214466fed04750f589524e3a15..4259b64c6c0b0c4ec34dc09f6f3b00ca1d9ecf18 100644 (file)
@@ -1,11 +1,14 @@
 # Run tests
 
-#SVN2SVN_TEST_OPTS=--verbose --debug
 SHELL_PATH ?= $(SHELL)
 RM ?= rm -f
+PROVE ?= prove
 DEFAULT_TEST_TARGET ?= test
 
-# Shell quote;
+#SVN2SVN_TEST_OPTS=--verbose --debug
+SVN2SVN_PROVE_OPTS ?= --timer --jobs 10
+
+# Shell quote
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 
 T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
@@ -15,6 +18,10 @@ all: $(DEFAULT_TEST_TARGET)
 test: pre-clean $(TEST_LINT)
        $(MAKE) aggregate-results-and-cleanup
 
+prove: pre-clean _repo_ref $(TEST_LINT)
+       @echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' $(SVN2SVN_PROVE_OPTS) $(T) :: $(SVN2SVN_TEST_OPTS)
+       $(MAKE) clean
+
 $(T): _repo_ref
        @echo "*** $@ ***"; '$(SHELL_PATH_SQ)' $@ $(SVN2SVN_TEST_OPTS)
 
@@ -27,6 +34,7 @@ pre-clean:
 clean:
        $(RM) -r test-results
        $(RM) -r _wc_*
+       $(RM) -r _repo_t*
 
 test-lint: test-lint-duplicates test-lint-executable
 
index 75d9e47b6c006dcf275a9bce1c8e7cf65f2358f4..172827527528468ab8bfa4b987220abcf7977618 100755 (executable)
@@ -7,8 +7,8 @@
 }
 
 PWD=$(pwd)
-WC1="$PWD/_wc_tmp1"
-WC2="$PWD/_wc_tmp2"
+WC1="$PWD/_wc_tmp1_$$"
+WC2="$PWD/_wc_tmp2_$$"
 found_diff=0
 
 # Create a working-copy for the reference repo
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/tests/t0001-diff-repo.sh b/tests/t0001-diff-repo.sh
deleted file mode 100755 (executable)
index 14d4132..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-
-test_description='Test diff-repo.sh
-'
-. ./test-lib.sh
-
-PWD=${TEST_DIRECTORY:-.}
-PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
-REPO="$PWD/_repo_tmp"
-REPO2="$PWD/_repo_tmp2"
-REPOURL="$PWDURL/_repo_tmp"
-REPO2URL="$PWDURL/_repo_tmp2"
-WC="$PWD/_wc_tmp"
-
-rm -rf "$REPO" "$REPO2" "$WC"
-
-# Create dummy repo
-svnadmin create "$REPO"
-svn mkdir -q -m "Add /trunk" $REPOURL/trunk
-svn co -q $REPOURL/trunk "$WC"
-mkdir -p "$WC/Module/ProjectA"
-echo "Module/ProjectA/FileA1.txt (Initial)" >> "$WC/Module/ProjectA/FileA1.txt"
-echo "Module/ProjectA/FileA2.txt (Initial)" >> "$WC/Module/ProjectA/FileA2.txt"
-svn -q add "$WC/Module"
-svn ci -q -m "Initial population" "$WC"
-
-test_expect_success \
-    "diff-repo: REPO1/trunk == REPO1/trunk" \
-    "./diff-repo.sh $REPOURL/trunk $REPOURL/trunk"
-
-test_expect_failure \
-    "diff-repo: REPO1/trunk != REPO1/trunk/Module" \
-    "./diff-repo.sh $REPOURL/trunk $REPOURL/trunk/Module"
-
-rsync -aq $PWD/_repo_tmp/ $PWD/_repo_tmp2
-
-test_expect_success \
-    "diff-repo: REPO1/trunk == REPO2/trunk (identical)" \
-    "./diff-repo.sh $REPOURL/trunk $REPO2URL/trunk"
-
-rm -rf "$WC"
-svn co -q $REPO2URL/trunk "$WC"
-echo "Module/ProjectA/FileA1.txt (Edit)" >> "$WC/Module/ProjectA/FileA1.txt"
-echo "Module/ProjectA/FileA3.txt (New File)" >> "$WC/Module/ProjectA/FileA3.txt"
-svn -q add "$WC/Module/ProjectA/FileA3.txt"
-svn ci -q -m "Second commit" "$WC"
-
-test_expect_failure \
-    "diff-repo: REPO1/trunk != REPO2/trunk (changed)" \
-    "./diff-repo.sh $REPOURL/trunk $REPO2URL/trunk"
-
-rm -rf "$REPO" "$REPO2" "$WC"
-test_done
diff --git a/tests/t0100-diff-repo.sh b/tests/t0100-diff-repo.sh
new file mode 100755 (executable)
index 0000000..d10639c
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+test_description='Test diff-repo.sh
+'
+. ./test-lib.sh
+
+author='Tony Duckles <tony@nynim.org>'
+
+
+PWD=${TEST_DIRECTORY:-.}
+PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
+REPONAME="_repo_t0100"
+REPO1="$PWD/${REPONAME}_tmp1"
+REPO2="$PWD/${REPONAME}_tmp2"
+REPO1URL="$PWDURL/_repo_t0100_tmp1"
+REPO2URL="$PWDURL/_repo_t0100_tmp2"
+WC="$PWD/_wc_t0100"
+
+test_expect_success \
+    "pre-cleanup" \
+    "rm -rf \"$REPO1\" \"$REPO2\" \"$WC\""
+
+test_expect_success \
+    "create repo1" \
+    "svnadmin create \"$REPO1\""
+
+test_expect_success \
+    "populate repo1" \
+    "svn mkdir -q -m \"Add /trunk\" $REPO1URL/trunk && \
+     svn co -q $REPO1URL/trunk \"$WC\" && \
+     mkdir -p \"$WC/Module/ProjectA\" && \
+     echo \"Module/ProjectA/FileA1.txt (Initial)\" >> \"$WC/Module/ProjectA/FileA1.txt\" && echo \"Module/ProjectA/FileA2.txt (Initial)\" >> \"$WC/Module/ProjectA/FileA2.txt\" && \
+     svn -q add \"$WC/Module\" && \
+     svn ci -q -m \"Initial population\" \"$WC\""
+
+test_expect_success \
+    "diff-repo: repo1/trunk == repo1/trunk" \
+    "./diff-repo.sh $REPO1URL/trunk $REPO1URL/trunk"
+
+test_expect_failure \
+    "diff-repo: repo1/trunk != repo1/trunk/Module" \
+    "./diff-repo.sh $REPO1URL/trunk $REPO1URL/trunk/Module"
+
+test_expect_success \
+    "rsync repo1 -> repo2" \
+    "rsync -aq \"$REPO1/\" \"$REPO2\""
+
+test_expect_success \
+    "diff-repo: repo1/trunk == repo2/trunk (identical)" \
+    "./diff-repo.sh $REPO1URL/trunk $REPO2URL/trunk"
+
+test_expect_success \
+    "modify repo2 content" \
+    "rm -rf \"$WC\" && \
+     svn co -q $REPO2URL/trunk \"$WC\" && \
+     echo \"Module/ProjectA/FileA1.txt (Edit)\" >> \"$WC/Module/ProjectA/FileA1.txt\" && \
+     echo \"Module/ProjectA/FileA3.txt (New File)\" >> \"$WC/Module/ProjectA/FileA3.txt\" && \
+     svn -q add \"$WC/Module/ProjectA/FileA3.txt\" && \
+     svn ci -q -m \"Second commit\" \"$WC\""
+
+test_expect_failure \
+    "diff-repo: repo1/trunk != repo2/trunk (changed)" \
+    "./diff-repo.sh $REPO1URL/trunk $REPO2URL/trunk"
+
+test_expect_success \
+    "cleanup" \
+    "rm -rf \"$REPO1\" \"$REPO2\" \"$WC\""
+
+test_done
diff --git a/tests/t0100-replay-all.sh b/tests/t0100-replay-all.sh
deleted file mode 100755 (executable)
index 8942a0f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-test_description='Use svnreplay to create a full copy of the ref repo
-'
-. ./test-lib.sh
-. ./replay-lib.sh
-
-SVNREPLAY="../svnreplay.py"
-PWD=${TEST_DIRECTORY:-.}
-PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
-REPO="$PWD/_repo_replay"
-REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
-
-init_replay_repo "$REPO"
-rm -rf _wc_target
-
-################################################################
-OFFSET="/"
-
-test_expect_success \
-    "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "$SVNREPLAY -av \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_success \
-    "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET (verify-all)" \
-    "$SVNREPLAY -avcX \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_success \
-    "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-rm -rf "$REPO" _wc_target
-test_done
diff --git a/tests/t0101-replay-trunk.sh b/tests/t0101-replay-trunk.sh
deleted file mode 100755 (executable)
index 49e6da3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-test_description='Use svnreplay to create a filtered repo with only /trunk history
-'
-. ./test-lib.sh
-. ./replay-lib.sh
-
-SVNREPLAY="../svnreplay.py"
-PWD=${TEST_DIRECTORY:-.}
-PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
-REPO="$PWD/_repo_replay"
-REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
-
-init_replay_repo "$REPO"
-rm -rf _wc_target
-
-################################################################
-OFFSET="/trunk"
-svn mkdir -q -m "Add $OFFSET" $REPOURL$OFFSET
-
-test_expect_success \
-    "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "$SVNREPLAY -av \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_success \
-    "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET (verify-all)" \
-    "$SVNREPLAY -avcX \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_success \
-    "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-rm -rf "$REPO" _wc_target
-test_done
diff --git a/tests/t0102-replay-branch.sh b/tests/t0102-replay-branch.sh
deleted file mode 100755 (executable)
index ed73b28..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-test_description='Use svnreplay to create a filtered repo with only /trunk/Module2/ProjectB history
-'
-. ./test-lib.sh
-. ./replay-lib.sh
-
-SVNREPLAY="../svnreplay.py"
-PWD=${TEST_DIRECTORY:-.}
-PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
-REPO="$PWD/_repo_replay"
-REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
-
-init_replay_repo "$REPO"
-rm -rf _wc_target
-
-################################################################
-OFFSET="/trunk/Module2/ProjectB"
-svn mkdir -q -m "Add /trunk" $REPOURL/trunk
-svn mkdir -q --parents -m "Add $OFFSET" $REPOURL$OFFSET
-
-test_expect_success \
-    "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "$SVNREPLAY -av \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_success \
-    "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET (verify-all)" \
-    "$SVNREPLAY -avcX \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_success \
-    "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-rm -rf "$REPO" _wc_target
-test_done
diff --git a/tests/t0103-replay-beforecommit.sh b/tests/t0103-replay-beforecommit.sh
deleted file mode 100755 (executable)
index d5c6ce6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-test_description='Use svnreplay along with --pre-commit to create a modified filtered repo with only /trunk/Module2/ProjectB history
-'
-. ./test-lib.sh
-. ./replay-lib.sh
-
-SVNREPLAY="../svnreplay.py"
-PWD=${TEST_DIRECTORY:-.}
-PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
-REPO="$PWD/_repo_replay"
-REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
-
-init_replay_repo "$REPO"
-rm -rf _wc_target
-
-################################################################
-OFFSET="/trunk/Module2/ProjectB"
-svn mkdir -q -m "Add /trunk" $REPOURL/trunk
-svn mkdir -q --parents -m "Add $OFFSET" $REPOURL$OFFSET
-
-test_expect_success \
-    "svnreplay --pre-commit _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "$SVNREPLAY -av --pre-commit=\"$PWD/t0103/before-commit.sh\" \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_failure \
-    "svnreplay --pre-commit _repo_ref$OFFSET _repo_replay$OFFSET (verify-all)" \
-    "$SVNREPLAY -avcX --pre-commit=\"$PWD/t0103/before-commit.sh\" \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-test_expect_failure \
-    "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
-    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
-
-#rm -rf "$REPO" _wc_target
-test_done
diff --git a/tests/t1100-replay-all.sh b/tests/t1100-replay-all.sh
new file mode 100755 (executable)
index 0000000..da325a4
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+test_description='Use svnreplay to create a full copy of the ref repo
+'
+. ./test-lib.sh
+. ./replay-lib.sh
+
+author='Tony Duckles <tony@nynim.org>'
+
+
+SVNREPLAY="../svnreplay.py"
+PWD=${TEST_DIRECTORY:-.}
+PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
+REPONAME="_repo_t1100"
+REPO="$PWD/$REPONAME"
+REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
+WC="$PWD/_wc_t1100"
+OFFSET="/"
+
+test_expect_success \
+    "pre-cleanup" \
+    "rm -rf \"$WC\""
+
+test_expect_success \
+    "init repo $REPONAME" \
+    "init_replay_repo \"$REPO\""
+
+test_expect_success \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "$SVNREPLAY -av --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET (verify-all)" \
+    "$SVNREPLAY -avcX --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "diff-repo _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "cleanup $REPONAME" \
+    "rm -rf \"$REPO\" \"$WC\""
+
+test_done
diff --git a/tests/t1101-replay-trunk.sh b/tests/t1101-replay-trunk.sh
new file mode 100755 (executable)
index 0000000..ca61995
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+test_description='Use svnreplay to create a filtered repo with only /trunk history
+'
+. ./test-lib.sh
+. ./replay-lib.sh
+
+author='Tony Duckles <tony@nynim.org>'
+
+
+SVNREPLAY="../svnreplay.py"
+PWD=${TEST_DIRECTORY:-.}
+PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
+REPONAME="_repo_t1101"
+REPO="$PWD/$REPONAME"
+REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
+WC="$PWD/_wc_t1101"
+OFFSET="/trunk"
+
+test_expect_success \
+    "pre-cleanup" \
+    "rm -rf \"$WC\""
+
+test_expect_success \
+    "init repo $REPONAME" \
+    "init_replay_repo \"$REPO\""
+
+test_expect_success \
+    "svn mkdir $REPONAME$OFFSET" \
+    "svn mkdir -q -m \"Add $OFFSET\" $REPOURL$OFFSET"
+
+test_expect_success \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "$SVNREPLAY -av --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET (verify-all)" \
+    "$SVNREPLAY -avcX --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "diff-repo _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "cleanup $REPONAME" \
+    "rm -rf \"$REPO\" \"$WC\""
+
+test_done
diff --git a/tests/t1102-replay-branch.sh b/tests/t1102-replay-branch.sh
new file mode 100755 (executable)
index 0000000..c149b16
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+test_description='Use svnreplay to create a filtered repo with only /trunk/Module2/ProjectB history
+'
+. ./test-lib.sh
+. ./replay-lib.sh
+
+author='Tony Duckles <tony@nynim.org>'
+
+
+SVNREPLAY="../svnreplay.py"
+PWD=${TEST_DIRECTORY:-.}
+PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
+REPONAME="_repo_t1102"
+REPO="$PWD/$REPONAME"
+REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
+WC="$PWD/_wc_t1102"
+
+OFFSET="/trunk/Module2/ProjectB"
+
+test_expect_success \
+    "pre-cleanup" \
+    "rm -rf \"$WC\""
+
+test_expect_success \
+    "init repo $REPONAME" \
+    "init_replay_repo \"$REPO\""
+
+test_expect_success \
+    "svn mkdir $REPONAME/trunk" \
+    "svn mkdir -q -m \"Add /trunk\" $REPOURL/trunk"
+test_expect_success \
+    "svn mkdir $REPONAME$OFFSET" \
+    "svn mkdir -q --parents -m \"Add $OFFSET\" $REPOURL$OFFSET"
+
+test_expect_success \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "$SVNREPLAY -av --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET (verify-all)" \
+    "$SVNREPLAY -avcX --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "diff-repo _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "cleanup $REPONAME" \
+    "rm -rf \"$REPO\" \"$WC\""
+
+test_done
diff --git a/tests/t1200-replay-beforecommit.sh b/tests/t1200-replay-beforecommit.sh
new file mode 100755 (executable)
index 0000000..72bbb94
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+test_description='Use svnreplay along with --pre-commit to create a modified filtered repo with only /trunk/Module2/ProjectB history
+'
+. ./test-lib.sh
+. ./replay-lib.sh
+
+author='Tony Duckles <tony@nynim.org>'
+
+
+SVNREPLAY="../svnreplay.py"
+PWD=${TEST_DIRECTORY:-.}
+PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
+REPONAME="_repo_t1200"
+REPO="$PWD/$REPONAME"
+REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
+WC="$PWD/_wc_t1200"
+OFFSET="/trunk/Module2/ProjectB"
+
+test_expect_success \
+    "pre-cleanup" \
+    "rm -rf \"$WC\""
+
+test_expect_success \
+    "init repo $REPONAME" \
+    "init_replay_repo \"$REPO\""
+
+test_expect_success \
+    "svn mkdir $REPONAME/trunk" \
+    "svn mkdir -q -m \"Add /trunk\" $REPOURL/trunk"
+test_expect_success \
+    "svn mkdir $REPONAME$OFFSET" \
+    "svn mkdir -q --parents -m \"Add $OFFSET\" $REPOURL$OFFSET"
+
+test_expect_success \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "$SVNREPLAY -av --pre-commit=\"$PWD/t1200/before-commit.sh\" --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_failure \
+    "svnreplay _repo_ref$OFFSET $REPONAME$OFFSET (verify-all)" \
+    "$SVNREPLAY -avcX --pre-commit=\"$PWD/t1200/before-commit.sh\" --wc \"$WC\" \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_failure \
+    "diff-repo _repo_ref$OFFSET $REPONAME$OFFSET" \
+    "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$REPOURL$OFFSET\""
+
+test_expect_success \
+    "cleanup $REPONAME" \
+    "rm -rf \"$REPO\" \"$WC\""
+
+test_done
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)