aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-07-31 22:28:40 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-07-31 22:28:40 +0300
commit1bc3177c5acbddc96584004b86db82f489b78346 (patch)
treecda12b88a33a54149e7ec4e51a7487e3c5f13138 /tests
parentc6baccd931d3f953410fdded9eade98be7bf3523 (diff)
Combine multiple single-character options into a single argument for testscript commands
Diffstat (limited to 'tests')
-rw-r--r--tests/init.testscript2
-rw-r--r--tests/project.testscript4
-rw-r--r--tests/publish.testscript12
-rw-r--r--tests/release.testscript30
4 files changed, 24 insertions, 24 deletions
diff --git a/tests/init.testscript b/tests/init.testscript
index 6e336fc..723ba04 100644
--- a/tests/init.testscript
+++ b/tests/init.testscript
@@ -177,7 +177,7 @@ deinit += -d prj
{
# Create (and build) the executable single-package project.
#
- cp --no-cleanup -p -r ../prj ./ &prj/***;
+ cp --no-cleanup -pr ../prj ./ &prj/***;
$* -C @cfg $cxx 2>>/~"%EOE%" &prj-cfg/***;
initializing in project $~/prj/
diff --git a/tests/project.testscript b/tests/project.testscript
index 673a728..fa1f0ea 100644
--- a/tests/project.testscript
+++ b/tests/project.testscript
@@ -15,11 +15,11 @@
# The most commonly used project cloning command that copies it from the
# parent scope working directory.
#
-clone_prj = cp -p -r ../prj ./
+clone_prj = cp -pr ../prj ./
# Clones the original project from the root scope working directory.
#
-clone_root_prj = cp -p -r $~/prj ./
+clone_root_prj = cp -pr $~/prj ./
# Setup a test command to use a cloned project directory by default.
#
diff --git a/tests/publish.testscript b/tests/publish.testscript
index a79657f..28b153d 100644
--- a/tests/publish.testscript
+++ b/tests/publish.testscript
@@ -220,7 +220,7 @@ g = git -C prj >! 2>!
test.options += --no-progress
test.arguments += --simulate 'success'
- clone_prj = cp --no-cleanup -p -r ../prj ./ &prj/***
+ clone_prj = cp --no-cleanup -pr ../prj ./ &prj/***
+$clone_prj
@@ -245,7 +245,7 @@ g = git -C prj >! 2>!
info: use --force=uncommitted to publish anyway
EOE
- $g commit -a -m 'Version';
+ $g commit -am 'Version';
$* 2>>~%EOE%
%package submission is queued(: \.*prj/1.0.16)?%d
@@ -276,7 +276,7 @@ g = git -C prj >! 2>!
#
sleep 1;
- $g commit -a -m 'Version';
+ $g commit -am 'Version';
$* 2>>~%EOE% != 0;
synchronizing:
@@ -298,10 +298,10 @@ g = git -C prj >! 2>!
test.options += --no-progress
test.arguments += --simulate 'success'
- clone_prj = cp --no-cleanup -p -r ../prj ./ &prj/***;
+ clone_prj = cp --no-cleanup -pr ../prj ./ &prj/***;
$clone_prj;
- rm -r -f prj/.git;
+ rm -rf prj/.git;
$init -C @cfg &prj-cfg/***;
sed -i -e 's/^(version:) .*$/\1 1.0.18/' prj/manifest;
@@ -538,7 +538,7 @@ g = git -C prj >! 2>!
# Reproduce the situation when the local build2-control branch exists but
# the remote-tracking one doesn't (see brep/publish.cxx for details).
#
- $g branch -D -r origin/build2-control;
+ $g branch -Dr origin/build2-control;
$* >&2 2>>~%EOE%;
synchronizing:
diff --git a/tests/release.testscript b/tests/release.testscript
index 6aaf5c4..2ea3b2a 100644
--- a/tests/release.testscript
+++ b/tests/release.testscript
@@ -19,8 +19,8 @@ g = git 2>! >&2
+mkdir --no-cleanup prj.git
+$g -C prj.git init --bare &prj.git/***
-clone_rep = cp --no-cleanup -p -r ../prj.git ./ &prj.git/***
-clone_root_rep = cp --no-cleanup -p -r $~/prj.git ./ &prj.git/***
+clone_rep = cp --no-cleanup -pr ../prj.git ./ &prj.git/***
+clone_root_rep = cp --no-cleanup -pr $~/prj.git ./ &prj.git/***
# Prepare the local repository.
#
@@ -37,8 +37,8 @@ log = $gp log '--pretty=format:"%d %s"'
+$gp commit -m 'Create'
+$gp push --set-upstream origin master
-clone_prj = cp --no-cleanup -p -r ../prj ./ &prj/***
-clone_root_prj = cp --no-cleanup -p -r $~/prj ./ &prj/***
+clone_prj = cp --no-cleanup -pr ../prj ./ &prj/***
+clone_root_prj = cp --no-cleanup -pr $~/prj ./ &prj/***
clone_repos = $clone_prj && $clone_rep
clone_root_repos = $clone_root_prj && $clone_root_rep
@@ -462,7 +462,7 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
$clone_root_repos;
rm prj/README.md;
- $gp commit -a -m 'Remove description';
+ $gp commit -am 'Remove description';
$* 2>>~%EOE% != 0;
%error: unable to read .+README\.md referenced by description-file manifest value in .+manifest: .+%
@@ -477,7 +477,7 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
EOE
echo '.' >= prj/README.md;
- $gp commit -a -m 'Fill README.md file';
+ $gp commit -am 'Fill README.md file';
$*
}
@@ -488,7 +488,7 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
$clone_root_repos;
echo 'some-file: README' >+ prj/manifest;
- $gp commit -a -m 'Add file';
+ $gp commit -am 'Add file';
$* 2>>~%EOE% != 0
%error: invalid package manifest: .+manifest:.+:1: unknown name 'some-file' in package manifest%
@@ -511,7 +511,7 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
$* --no-commit;
- $gp commit -a -m 'Release version';
+ $gp commit -am 'Release version';
$* --tag --push 2>>EOE;
pushing branch master, tag v0.1.0
@@ -884,7 +884,7 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
$* --no-commit;
- $gp commit -a -m 'Release revision';
+ $gp commit -am 'Release revision';
$release --tag --push --yes -d prj;
$clone2;
@@ -903,10 +903,10 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
+$clone_repos
+echo '' >+ prj/repositories.manifest
- +$gp commit -a -m 'Fix repositories.manifest'
+ +$gp commit -am 'Fix repositories.manifest'
+echo '' >+ prj/buildfile
- +$gp commit -a -m 'Fix buildfile' -m "Add '\n' to the end of the file."
+ +$gp commit -am 'Fix buildfile' -m "Add '\n' to the end of the file."
+echo '' >+ prj/manifest
+$gp add manifest
@@ -975,7 +975,7 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
{
$clone_repos;
- $gp commit -a -m 'Change manifest';
+ $gp commit -am 'Change manifest';
$*;
@@ -1032,7 +1032,7 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
$* --open --no-commit;
- $gp commit -a -m 'Open dev cycle';
+ $gp commit -am 'Open dev cycle';
$gp push origin HEAD --tags;
$clone2;
@@ -1058,12 +1058,12 @@ log2 = $gp2 log '--pretty=format:"%d %s"'
% \(HEAD -> master, .*\) Create%
EOO
- $gp commit -a -m 'Release version';
+ $gp commit -am 'Release version';
$* --tag;
$* --open --no-commit;
- $gp commit -a -m 'Change version';
+ $gp commit -am 'Change version';
$gp push origin HEAD --tags;
$pull2;