diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-11 21:48:28 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-14 18:08:06 +0300 |
commit | cbd7cabcc3e6b24e80521bfec230e905f420ff4f (patch) | |
tree | f30aa2cd077fcb6a1939a7fdb79a80346d44d350 /tests/fetch.test | |
parent | 61cdde35094fc655eac2e6968b465f217e91d0ac (diff) |
Add some tests
Diffstat (limited to 'tests/fetch.test')
-rw-r--r-- | tests/fetch.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/fetch.test b/tests/fetch.test new file mode 100644 index 0000000..ad0640e --- /dev/null +++ b/tests/fetch.test @@ -0,0 +1,43 @@ +# file : tests/fetch.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include common.test project.test + +new += 2>! +init += cc "config.cxx=$config.cxx" -d prj 2>! +status += --all + +: add-dependency +: +{ + $clone_prj; + $init -C prj-cfg @cfg &prj/build/bootstrap/*** &prj-cfg/***; + + $new -t lib --vcs none libfoo &libfoo/*** 2>!; + $new -t lib --vcs none libbar &libbar/*** 2>!; + + cat <<EOI >+prj/repositories.manifest; + : + role: prerequisite + location: ../libfoo + type: dir + : + role: complement + location: ../libbar + type: dir + EOI + + $* 2>>/"EOE"; + fetching dir:$~/libbar \(complements dir:$~/prj\) + fetching dir:$~/libfoo \(prerequisite of dir:$~/prj\) + EOE + + $status -d prj >'prj configured 0.1.0-a.0.19700101000000'; + + $bpkg list --complements --prerequisites -d prj-cfg >>/"EOO" + dir:$~/prj $~/prj + complement dir:$~/libbar $~/libbar + prerequisite dir:$~/libfoo $~/libfoo + EOO +} |