aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-11-04 16:08:46 +0000
committermerakor <cem@ckyln.com>2021-11-04 16:08:46 +0000
commitee9fdf3c87322967d36eba8fe1e872cebb723b4f (patch)
treee1d3cf78ee15617920f71674d7152124af7d8c7f /spec
parenta16f90bbc44c411fa329d2b3130ba767ed748614 (diff)
downloadcpt-ee9fdf3c87322967d36eba8fe1e872cebb723b4f.tar.gz
update tests
FossilOrigin-Name: 4eb5269e18dad0ffb3f080602e2fa6971164a2e235c5935ddbd473ff76794219
Diffstat (limited to 'spec')
-rw-r--r--spec/01_lib_spec.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/01_lib_spec.sh b/spec/01_lib_spec.sh
index c9a30db..6612618 100644
--- a/spec/01_lib_spec.sh
+++ b/spec/01_lib_spec.sh
@@ -189,5 +189,25 @@ Describe 'CPT Library'
The output should eq "dummy-pkg contrib-dummy-pkg "
End
End
+ Describe 'pkg_query_meta()'
+ CPT_PATH=$PWD/tests/repository
+ It 'queries package meta information'
+ When call pkg_query_meta contrib-dummy-pkg description
+ The output should eq "This is a dummy package"
+ End
+ It 'returns an error if there is no meta file'
+ When call pkg_query_meta dummy-pkg description
+ The status should be failure
+ End
+ It 'returns an error if the queried key is unavailable'
+ When call pkg_query_meta contrib-dummy-pkg license
+ The status should be failure
+ End
+ It "accepts full paths to the package location"
+ When call pkg_query_meta "$PWD/tests/repository/contrib-dummy-pkg" description
+ The output should eq "This is a dummy package"
+ The status should be success
+ End
+ End
End
End