aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-04-10 22:56:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-04-16 16:27:18 +0300
commitbf02b66c61d941a60e45520ef77f677dad36557e (patch)
tree0d61c6a06e868aeee2d6375a8581f87a47eac5b1 /tests
parent842b2c6604be98a7f5d05cb674ae121d716eeb64 (diff)
Add --amend and --squash options to bdep-release
Diffstat (limited to 'tests')
-rw-r--r--tests/release.testscript126
1 files changed, 125 insertions, 1 deletions
diff --git a/tests/release.testscript b/tests/release.testscript
index 2f63265..1ba4cbc 100644
--- a/tests/release.testscript
+++ b/tests/release.testscript
@@ -651,6 +651,124 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
Create
EOO
}
+
+ : amend
+ :
+ {
+ test.arguments += --push --amend --no-edit
+
+ +$clone_repos
+
+ +echo '' >+ prj/repositories.manifest
+ +$gp commit -a -m 'Fix repositories.manifest'
+
+ +echo '' >+ prj/buildfile
+ +$gp commit -a -m 'Fix buildfile' -m "Add '\n' to the end of the file."
+
+ +echo '' >+ prj/manifest
+ +$gp add manifest
+
+ : no-squash
+ :
+ {
+ $clone_repos;
+
+ $* 2>>~%EOE%;
+ %Updated tag 'v0.1.0' \(was \.*\)%d
+ EOE
+
+ $clone2;
+ $log2 >>:~%EOO%;
+ % \(HEAD -> master, tag: v0.1.0, \.*\) Release version 0.1.0\+1%d
+ Fix repositories.manifest
+ Release version 0.1.0
+ Create
+ EOO
+
+ $log2 '--pretty=format:%B' >>EOO
+ Release version 0.1.0+1
+
+ Fix buildfile
+
+ Add 'n' to the end of the file.
+
+ Fix repositories.manifest
+
+ Release version 0.1.0
+
+ Create
+ EOO
+ }
+
+ : squash
+ :
+ {
+ $clone_repos;
+
+ $* --squash 2 2>>~%EOE%;
+ %Updated tag 'v0.1.0' \(was \.*\)%d
+ EOE
+
+ $clone2;
+ $log2 >>:~%EOO%;
+ % \(HEAD -> master, tag: v0.1.0, \.*\) Release version 0.1.0\+1%d
+ Release version 0.1.0
+ Create
+ EOO
+
+ $log2 '--pretty=format:%B' >>EOO
+ Release version 0.1.0+1
+
+ Fix buildfile
+
+ Add 'n' to the end of the file.
+
+ Fix repositories.manifest
+
+ Release version 0.1.0
+
+ Create
+ EOO
+ }
+
+ : no-changes-staged
+ :
+ {
+ $clone_repos;
+
+ $gp commit -a -m 'Change manifest';
+
+ $* 2>>~%EOE%;
+ %Updated tag 'v0.1.0' \(was \.*\)%d
+ EOE
+
+ $clone2;
+ $log2 >>:~%EOO%;
+ % \(HEAD -> master, tag: v0.1.0, \.*\) Release version 0.1.0\+1%d
+ Fix buildfile
+ Fix repositories.manifest
+ Release version 0.1.0
+ Create
+ EOO
+
+
+ $log2 '--pretty=format:%B' >>EOO
+ Release version 0.1.0+1
+
+ Change manifest
+
+ Fix buildfile
+
+ Add 'n' to the end of the file.
+
+ Fix repositories.manifest
+
+ Release version 0.1.0
+
+ Create
+ EOO
+ }
+ }
}
: open
@@ -1016,5 +1134,11 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
$* --push --show-push 2>'error: both --push and --show-push specified' != 0;
$* --edit --no-commit 2>'error: both --no-commit and --edit specified' != 0;
- $* --open-base 1.2.3 --open-beta 2>'error: both --open-beta and --open-base specified' != 0
+ $* --open-base 1.2.3 --open-beta 2>'error: both --open-beta and --open-base specified' != 0;
+
+ $* --amend 2>'error: --amend requires --revision' != 0;
+ $* --squash 1 2>'error: --squash requires --amend' != 0;
+ $* --revision --amend --squash 0 2>'error: invalid --squash value: 0' != 0;
+ $* --revision --amend --no-commit 2>'error: both --amend and --no-commit specified' != 0
+
}