From ee9fdf3c87322967d36eba8fe1e872cebb723b4f Mon Sep 17 00:00:00 2001 From: merakor Date: Thu, 4 Nov 2021 16:08:46 +0000 Subject: update tests FossilOrigin-Name: 4eb5269e18dad0ffb3f080602e2fa6971164a2e235c5935ddbd473ff76794219 --- spec/01_lib_spec.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 -- cgit v1.2.3