diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/publish.testscript | 90 | ||||
-rw-r--r-- | tests/release.testscript | 94 |
2 files changed, 181 insertions, 3 deletions
diff --git a/tests/publish.testscript b/tests/publish.testscript index 688859d..9c0f7e2 100644 --- a/tests/publish.testscript +++ b/tests/publish.testscript @@ -31,9 +31,9 @@ g = [cmdline] git -C prj >! 2>! # Note that using the same package name and version for tests may result in # duplicate submissions. We will use unique version for each test, -# incrementing the patch version for 1.0.X. +# incrementing the patch version for *.*.X. # -# Next version to use: 1.0.25 +# Next version to use: *.*.29 # # Normally we disable the progress indication that complicates stderr output @@ -129,6 +129,72 @@ g = [cmdline] git -C prj >! 2>! EOE } + : zero-major-version + : + { + : alpha + : + { + $clone_root_prj; + $init -C @cfg &prj-cfg/***; + sed -i -e 's/^(version:) .*$/\1 0.1.27/' prj/manifest; + + # Suppress the --yes option. + # + test.arguments = $regex.apply($test.arguments, '^--yes$', ''); + + $* <<EOI 2>>~%EOE% + y + y + EOI + %.* + package prj 0.1.27 has 0 major version component and should be published to alpha section if this version is semver + publish to alpha as opposed to stable [y/n] publishing: + %.* + package: prj + version: 0.1.27 + project: prj + section: alpha + %.* + continue? [y/n] submitting prj-0.1.27.tar.gz + %.* + %package submission is queued.+% + %reference: .{12}% + EOE + } + + : stable + : + { + $clone_root_prj; + $init -C @cfg &prj-cfg/***; + sed -i -e 's/^(version:) .*$/\1 0.1.28/' prj/manifest; + + # Suppress the --yes option. + # + test.arguments = $regex.apply($test.arguments, '^--yes$', ''); + + $* <<EOI 2>>~%EOE% + n + y + EOI + %.* + package prj 0.1.28 has 0 major version component and should be published to alpha section if this version is semver + publish to alpha as opposed to stable [y/n] publishing: + %.* + package: prj + version: 0.1.28 + project: prj + section: stable + %.* + continue? [y/n] submitting prj-0.1.28.tar.gz + %.* + %package submission is queued.+% + %reference: .{12}% + EOE + } + } + : non-standard-version : : Test publishing a package with the non-standard version from a @@ -213,6 +279,7 @@ g = [cmdline] git -C prj >! 2>! test.arguments = $regex.apply($test.arguments, '^--yes$', ''); $* libprj <'y' 2>>~"%EOE%" + warning: following project packages not being published: prj publishing: % to: $repository% as: user <user@example.com> @@ -274,11 +341,30 @@ g = [cmdline] git -C prj >! 2>! test.arguments = $regex.apply($test.arguments, '^(prj)$', '\1/libprj'); $* 2>>~%EOE% + warning: following project packages not being published: prj %package submission is queued(: \.*prj/1.0.3)?%d %reference: .{12}% EOE } + : all + : + { + $clone_prj; + sed -i -e 's/^(version:) .*$/\1 1.0.25/' prj/prj/manifest; + sed -i -e 's/^(version:) .*$/\1 1.0.26/' prj/libprj/manifest; + $init -C @cfg &prj-cfg/***; + + test.arguments = $regex.apply($test.arguments, '^(-d|prj)$', ''); + + env -c prj/libprj -- $* 2>>~%EOE% + %package submission is queued(: \.*libprj/1.0.26)?%d + %reference: .{12}% + %package submission is queued(: \.*prj/1.0.25)?%d + %reference: .{12}% + EOE + } + : prompt : { diff --git a/tests/release.testscript b/tests/release.testscript index 2b86964..8089e99 100644 --- a/tests/release.testscript +++ b/tests/release.testscript @@ -1122,6 +1122,94 @@ new += --vcs git,branch=master 2>- test.options += -q + : pkg-spec + : + { + +$clone_repos + + test.arguments += --no-open --push --yes + + : dir + : + { + $clone_repos; + + test.arguments = $regex.apply($test.arguments, '^(-d|prj)$', ''); + + $* -d prj/libprj 2>>EOE; + warning: following project packages not being released: prj + EOE + + $clone2; + + cat prj2/libprj/manifest >>~%EOO%; + %.* + name: libprj + version: 0.1.0 + %.* + EOO + + cat prj2/prj/manifest >>~%EOO% + %.* + name: prj + version: 0.1.0-a.0.z + %.* + EOO + } + + : name + : + { + $clone_repos; + + $* libprj 2>>EOE; + warning: following project packages not being released: prj + EOE + + $clone2; + + cat prj2/libprj/manifest >>~%EOO%; + %.* + name: libprj + version: 0.1.0 + %.* + EOO + + cat prj2/prj/manifest >>~%EOO% + %.* + name: prj + version: 0.1.0-a.0.z + %.* + EOO + } + + : no-pkg-prj-spec + : + { + $clone_repos; + + test.arguments = $regex.apply($test.arguments, '^(-d|prj)$', ''); + + env -c prj/libprj -- $*; + + $clone2; + + cat prj2/libprj/manifest >>~%EOO%; + %.* + name: libprj + version: 0.1.0 + %.* + EOO + + cat prj2/prj/manifest >>~%EOO% + %.* + name: prj + version: 0.1.0 + %.* + EOO + } + } + : patch : { @@ -1164,7 +1252,11 @@ new += --vcs git,branch=master 2>- echo '' >+ prj/prj/manifest; $gp add prj/manifest; - $release --revision --current-tag=update -q --yes --no-edit -d prj/prj; + $release --revision --current-tag=update -q --yes --no-edit -d prj/prj 2>>~%EOE%; + %.* + warning: following project packages not being released: libprj + %.* + EOE echo '' >+ prj/prj/manifest; $gp add prj/manifest; |