aboutsummaryrefslogtreecommitdiff
path: root/tests/publish.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-07-11 21:16:08 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-08-12 12:53:05 +0300
commit1ac2b1310851b3da03318797231f3832f4804c79 (patch)
treeae06ffe5409b8230f930499463b694eb96c11f1f /tests/publish.testscript
parent6ecb087d239a19ccbc272a5f2333a16d4cfe9f59 (diff)
Allow using package names in commands (GH issue #355)
Diffstat (limited to 'tests/publish.testscript')
-rw-r--r--tests/publish.testscript60
1 files changed, 54 insertions, 6 deletions
diff --git a/tests/publish.testscript b/tests/publish.testscript
index 41b5eed..688859d 100644
--- a/tests/publish.testscript
+++ b/tests/publish.testscript
@@ -33,7 +33,7 @@ g = [cmdline] git -C prj >! 2>!
# duplicate submissions. We will use unique version for each test,
# incrementing the patch version for 1.0.X.
#
-# Next version to use: 1.0.22
+# Next version to use: 1.0.25
#
# Normally we disable the progress indication that complicates stderr output
@@ -136,17 +136,39 @@ g = [cmdline] git -C prj >! 2>!
:
{
$new --no-init --no-amalgamation prj 2>- &prj/***;
- sed -i -e 's/^(version:) .*$/\1 12345/' prj/manifest;
+ sed -i -e 's/^(version:) .*$/\1 1.0.22/' prj/manifest;
sed -i \
- -e 's/^(amalgamation =.*)$/\1\nversion = 12345\ndist.package = $project-$version/' \
+ -e 's/^(amalgamation =.*)$/\1\nversion = 1.0.22\ndist.package = $project-$version/' \
-e 's/^using version$//' \
prj/build/bootstrap.build;
$build 'configure:' prj/@prj-cfg/,forward &prj/build/bootstrap/*** 2>!;
- $* --no-progress --forward --section alpha 2>>~%EOE%
- %package submission is queued(: .*prj/12345)?%
+ $* --no-progress --forward --section alpha 2>>~%EOE%;
+ %package submission is queued(: .*prj/1.0.22)?%
+ %reference: .{12}%
+ EOE
+
+ # While at it, test specifying a package name on the command line.
+ #
+ sed -i -e 's/^(version:) .*$/\1 1.0.23/' prj/manifest;
+ sed -i -e 's/^(version =) .*$/\1 1.0.23/' prj/build/bootstrap.build;
+
+ # Suppress the --yes option.
+ #
+ test.arguments = $regex.apply($test.arguments, '^--yes$', '');
+
+ $* --no-progress --forward --section alpha prj <'y' 2>>~"%EOE%"
+ publishing:
+ % to: $repository%
+ as: user <user@example.com>
+ package: prj
+ version: 1.0.23
+ project: prj
+ section: alpha
+ %.?
+ %continue\\?.+ package submission is queued.+%
%reference: .{12}%
EOE
}
@@ -178,6 +200,32 @@ g = [cmdline] git -C prj >! 2>!
EOE
}
+ : pkg-by-name
+ :
+ {
+ $clone_prj;
+ sed -i -e 's/^(version:) .*$/\1 1.0.24/' prj/libprj/manifest;
+ sed -i -e 's/^(version:) .*$/\1 1.0.24/' prj/prj/manifest;
+ $init -C @cfg &prj-cfg/***;
+
+ # Suppress the --yes option.
+ #
+ test.arguments = $regex.apply($test.arguments, '^--yes$', '');
+
+ $* libprj <'y' 2>>~"%EOE%"
+ publishing:
+ % to: $repository%
+ as: user <user@example.com>
+ package: libprj
+ version: 1.0.24
+ project: prj
+ section: stable
+ %.?
+ %continue\\?.+ package submission is queued.+%
+ %reference: .{12}%
+ EOE
+ }
+
: diff-configs
:
{
@@ -241,7 +289,7 @@ g = [cmdline] git -C prj >! 2>!
# Suppress the --yes option.
#
- test.arguments = $regex.apply($test.arguments, '^(--yes)$', '');
+ test.arguments = $regex.apply($test.arguments, '^--yes$', '');
$* <'y' 2>>~"%EOE%"
publishing: