From cbd7cabcc3e6b24e80521bfec230e905f420ff4f Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 11 May 2018 21:48:28 +0300 Subject: Add some tests --- tests/fetch.test | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/fetch.test (limited to 'tests/fetch.test') 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 <+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 +} -- cgit v1.1