aboutsummaryrefslogtreecommitdiff
path: root/tests/update.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/update.testscript
parent6ecb087d239a19ccbc272a5f2333a16d4cfe9f59 (diff)
Allow using package names in commands (GH issue #355)
Diffstat (limited to 'tests/update.testscript')
-rw-r--r--tests/update.testscript42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/update.testscript b/tests/update.testscript
index 528a12b..a5689b6 100644
--- a/tests/update.testscript
+++ b/tests/update.testscript
@@ -135,3 +135,45 @@ deinit += -d prj
drop pkg1
EOE
}
+
+: pkg-by-name
+:
+{
+ $new -t empty prj &prj/***;
+
+ $new --package pkg1 -d prj;
+ $new --package pkg2 -d prj;
+
+ $init -C @cfg &prj-cfg/***;
+
+ $* pkg3 -d prj/ 2>>/"EOE" != 0;
+ error: no package pkg3 in project $~/prj/
+ EOE
+
+ $* pkg1 -d prj/pkg2 2>>~%EOE%;
+ %(mkdir|c\+\+|ld|ln) .+%{8}
+ EOE
+
+ # @@ TMP Strangely, get re-symlinked on Windows (every time if run this
+ # command multiple times).
+ #
+ $* pkg1 -d prj/ 2>>~%EOE%;
+ %ln .+pkg1.+ -> .+pkg1.+%?
+ %info: .+pkg1.+ is up to date%
+ EOE
+
+ $deinit pkg3 -d prj 2>>/"EOE" != 0;
+ error: no package pkg3 in project $~/prj/
+ EOE
+
+ # While at it, test specifying a package name on the deinit command line.
+ #
+ $deinit pkg1 -d prj/pkg2 2>>/"EOE"
+ deinitializing in project $~/prj/
+ deinitializing package pkg1
+ deinitializing package pkg2
+ synchronizing:
+ drop pkg1
+ drop pkg2
+ EOE
+}