aboutsummaryrefslogtreecommitdiff
path: root/tests/update.testscript
diff options
context:
space:
mode:
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
+}