aboutsummaryrefslogtreecommitdiff
path: root/tests/fetch.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-09-04 14:32:11 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-09-04 14:49:21 +0300
commitd1d9fbc899be37bba7b05f31ac5c7a4d15d64811 (patch)
tree99722bfda82125c5ad383917df0af794ff1b9e1f /tests/fetch.testscript
parent971b29ac8c45da1659a57421f95d4caa237ee6be (diff)
Rename .test/test{} to .testscript/testscript{}
Diffstat (limited to 'tests/fetch.testscript')
-rw-r--r--tests/fetch.testscript54
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/fetch.testscript b/tests/fetch.testscript
new file mode 100644
index 0000000..2564470
--- /dev/null
+++ b/tests/fetch.testscript
@@ -0,0 +1,54 @@
+# file : tests/fetch.testscript
+# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+.include common.testscript project.testscript
+
+cxx = cc config.cxx="$recall($cxx.path)"
+
+new += 2>!
+init += $cxx -d prj 2>!
+status += --all -d prj
+deinit += -d prj
+
+: dependency
+:
+{
+ $clone_prj;
+ $init -C @cfg &prj-cfg/***;
+
+ $new -t lib libbar &libbar/*** 2>!;
+ $new -t lib libfoo &libfoo/*** 2>!;
+
+ cat <<EOI >+prj/repositories.manifest;
+ :
+ role: prerequisite
+ location: ../libfoo
+ type: dir
+ :
+ role: complement
+ location: ../libbar
+ type: dir
+ EOI
+
+ cat <<EOI >+prj/manifest;
+ depends: libfoo
+ depends: libbar
+ EOI
+
+ $* 2>>/"EOE";
+ fetching dir:$~/libbar \(complements dir:$~/prj\)
+ fetching dir:$~/libfoo \(prerequisite of dir:$~/prj\)
+ EOE
+
+ $status libfoo libbar >>~%EOO%;
+ %libfoo available \[.+\]%
+ %libbar available .+%
+ EOO
+
+ $deinit 2>>/"EOE"
+ deinitializing in project $~/prj/
+ synchronizing:
+ drop prj
+ EOE
+}