reformatted my spanking new showcase tsh-based test script
This commit is contained in:
parent
7744143f6c
commit
70a9ea5e16
|
@ -1,4 +1,4 @@
|
||||||
# vim: syn=sh:
|
# vim: ft=sh:
|
||||||
tsh pwd || die '## tsh not installed?'
|
tsh pwd || die '## tsh not installed?'
|
||||||
|
|
||||||
for wr in 0 1
|
for wr in 0 1
|
||||||
|
@ -25,12 +25,16 @@ do
|
||||||
|
|
||||||
name "setup a merged push"
|
name "setup a merged push"
|
||||||
|
|
||||||
tsh "ls -al foo; !ok; /cannot access foo: No such file or directory/
|
tsh "
|
||||||
clone u1:foo; ok; /Cloning into/; /You appear to have cloned an empty/"
|
ls -al foo; !ok; /cannot access foo: No such file or directory/
|
||||||
|
clone u1:foo; ok; /Cloning into/
|
||||||
|
/You appear to have cloned an empty/
|
||||||
|
"
|
||||||
|
|
||||||
cd foo
|
cd foo
|
||||||
|
|
||||||
tsh "ls -Al; ok; /\.git/
|
tsh "
|
||||||
|
ls -Al; ok; /\.git/
|
||||||
test-commit aa; ok; /1 files changed, 1 insertions/
|
test-commit aa; ok; /1 files changed, 1 insertions/
|
||||||
tag start; ok
|
tag start; ok
|
||||||
push-om; ok; /new branch.*master.-..master/
|
push-om; ok; /new branch.*master.-..master/
|
||||||
|
@ -41,35 +45,48 @@ do
|
||||||
test-commit dd ee; ok
|
test-commit dd ee; ok
|
||||||
git merge new; ok; /Merge made.*recursive/
|
git merge new; ok; /Merge made.*recursive/
|
||||||
test-commit ff; ok
|
test-commit ff; ok
|
||||||
tag end; ok"
|
tag end; ok
|
||||||
|
"
|
||||||
|
|
||||||
name "push by u4 should fail"
|
name "push by u4 should fail"
|
||||||
tsh "push u4:foo master
|
tsh "
|
||||||
/WM refs/heads/master foo u4 DENIED by fallthru/
|
push u4:foo master; /WM refs/heads/master foo u4 DENIED by fallthru/
|
||||||
/To u4:foo/
|
/To u4:foo/
|
||||||
/remote rejected.*hook declined/
|
/remote rejected.*hook declined/
|
||||||
/failed to push some refs/"
|
/failed to push some refs/
|
||||||
|
"
|
||||||
|
|
||||||
name "push by u3 should succeed"
|
name "push by u3 should succeed"
|
||||||
tsh "push u3:foo master; ok; /To u3:foo/; /master.-..master/"
|
tsh "
|
||||||
|
push u3:foo master; ok; /To u3:foo/; /master.-..master/
|
||||||
|
"
|
||||||
|
|
||||||
name "rewind by u3 should fail"
|
name "rewind by u3 should fail"
|
||||||
tsh "reset-h start; ok; /HEAD is now at .* aa /
|
tsh "
|
||||||
push u3:foo +master; !ok; /rejected.*hook declined/; /failed to push some refs/"
|
reset-h start; ok; /HEAD is now at .* aa /
|
||||||
|
push u3:foo +master; !ok; /rejected.*hook declined/
|
||||||
|
/failed to push some refs/
|
||||||
|
"
|
||||||
|
|
||||||
name "rewind by u2 should succeed"
|
name "rewind by u2 should succeed"
|
||||||
tsh "push u2:foo +master; ok; /To u2:foo/; /forced update/"
|
tsh "
|
||||||
|
push u2:foo +master; ok; /To u2:foo/
|
||||||
|
/forced update/
|
||||||
|
"
|
||||||
|
|
||||||
name "push by u2 should fail"
|
name "push by u2 should fail"
|
||||||
tsh "reset-h end; ok; /HEAD is now at .* ff /
|
tsh "
|
||||||
push u2:foo master
|
reset-h end; ok; /HEAD is now at .* ff /
|
||||||
/WM refs/heads/master foo u2 DENIED by fallthru/
|
push u2:foo master; /WM refs/heads/master foo u2 DENIED by fallthru/
|
||||||
/To u2:foo/
|
/To u2:foo/
|
||||||
/remote rejected.*hook declined/
|
/remote rejected.*hook declined/
|
||||||
/failed to push some refs/"
|
/failed to push some refs/
|
||||||
|
"
|
||||||
|
|
||||||
name "push by u1 should succeed"
|
name "push by u1 should succeed"
|
||||||
tsh "push u1:foo master; ok; /master.-..master/"
|
tsh "
|
||||||
|
push u1:foo master; ok; /master.-..master/
|
||||||
|
"
|
||||||
|
|
||||||
name INTERNAL
|
name INTERNAL
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue