aboutsummaryrefslogtreecommitdiff
path: root/tests/sync.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/sync.testscript
parent6ecb087d239a19ccbc272a5f2333a16d4cfe9f59 (diff)
Allow using package names in commands (GH issue #355)
Diffstat (limited to 'tests/sync.testscript')
-rw-r--r--tests/sync.testscript61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/sync.testscript b/tests/sync.testscript
index 9f3e381..253e026 100644
--- a/tests/sync.testscript
+++ b/tests/sync.testscript
@@ -205,6 +205,67 @@ deinit += -d prj
EOE
}
+: pkg-by-name
+:
+{
+ $new -t empty prj &prj/***;
+
+ $new --package pkg1 -d prj;
+ $new --package pkg2 -d prj;
+
+ init += -d prj;
+
+ $init -C @cfg $config_cxx &prj-cfg/***;
+
+ $new -t lib libprj &libprj/***;
+
+ cat <<EOI >+prj/repositories.manifest;
+ :
+ role: prerequisite
+ location: ../libprj
+ type: dir
+ EOI
+
+ cat <<EOI >+prj/pkg1/manifest;
+ depends: libprj
+ EOI
+
+ cat <<EOI >+prj/pkg2/manifest;
+ tags: c++
+ EOI
+
+ $* pkg1 -d prj/pkg2 ?libprj 2>>~%EOE%;
+ %.+
+ synchronizing:
+ new libprj/0.1.0-a.0.19700101000000 (required by pkg1)
+ upgrade pkg1/0.1.0-a.0.19700101000000#1
+ upgrade pkg2/0.1.0-a.0.19700101000000#1
+ EOE
+
+ sed -i -e 's/^(version:).+$/\1 1.0.0/' libprj/manifest;
+
+ $* libprj -f -d prj 2>>~%EOE%;
+ %.+
+ synchronizing:
+ upgrade libprj/1.0.0
+ reconfigure pkg1/0.1.0-a.0.19700101000000#1
+ EOE
+
+ $* libprj pkg1 -d prj 2>>EOE != 0;
+ error: initialized package pkg1 specified with dependency package libprj
+ EOE
+
+ $deinit 2>>/"EOE"
+ deinitializing in project $~/prj/
+ deinitializing package pkg1
+ deinitializing package pkg2
+ synchronizing:
+ drop pkg1
+ drop libprj
+ drop pkg2
+ EOE
+}
+
: config-vars
:
{