diff options
author | merakor <cem@ckyln.com> | 2021-01-05 17:29:39 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-01-05 17:29:39 +0000 |
commit | ca1d37bfdd5d936a183989d7a49ad31d1d8911c9 (patch) | |
tree | b6c0cf13b0267d0137e49ac99719b1390f968e24 | |
parent | 80b1d3cc06ac5a57fd9b5366c1ab018ced4b9c31 (diff) | |
download | cpt-ca1d37bfdd5d936a183989d7a49ad31d1d8911c9.tar.gz |
shellspec tests: add dummy package
FossilOrigin-Name: f3030dbdf86db777d35323a4db2c102d4a507fd2a8900fad9c173e73d0f989e9
-rw-r--r-- | spec/02_src_spec.sh | 6 | ||||
-rwxr-xr-x | tests/repository/dummy-pkg/build | 4 | ||||
-rw-r--r-- | tests/repository/dummy-pkg/checksums | 0 | ||||
-rw-r--r-- | tests/repository/dummy-pkg/version | 1 |
4 files changed, 11 insertions, 0 deletions
diff --git a/spec/02_src_spec.sh b/spec/02_src_spec.sh index 626c7b3..b97fe3c 100644 --- a/spec/02_src_spec.sh +++ b/spec/02_src_spec.sh @@ -1,5 +1,11 @@ Describe 'Main toolchain' export PATH=$PWD/src:$PATH + export CPT_ROOT=$PWD/tests + export CPT_PATH=$PWD/tests/repository + install_dummy() { CPT_HOOK='' ./src/cpt bi dummy-pkg ;} + remove_dummy() { rm -rf "${CPT_ROOT:?}/var" ;} + BeforeAll install_dummy + AfterAll remove_dummy Describe 'cpt' diff --git a/tests/repository/dummy-pkg/build b/tests/repository/dummy-pkg/build new file mode 100755 index 0000000..d37d964 --- /dev/null +++ b/tests/repository/dummy-pkg/build @@ -0,0 +1,4 @@ +#!/bin/sh -e + +# Check that we are receiving 3 arguments +[ "$3" ] || exit 1 diff --git a/tests/repository/dummy-pkg/checksums b/tests/repository/dummy-pkg/checksums new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/repository/dummy-pkg/checksums diff --git a/tests/repository/dummy-pkg/version b/tests/repository/dummy-pkg/version new file mode 100644 index 0000000..2fb73a0 --- /dev/null +++ b/tests/repository/dummy-pkg/version @@ -0,0 +1 @@ +1 1 |