diff options
author | merakor <cem@ckyln.com> | 2021-08-10 23:28:55 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-08-10 23:28:55 +0000 |
commit | 4efb2ffed359b16fbb63002373547d78b1e3cece (patch) | |
tree | 2008dc8250b843a384002c3f58d1a77c031e55af /spec | |
parent | 9852ee716601b427214ed84e008779f4df612fb9 (diff) | |
download | cpt-4efb2ffed359b16fbb63002373547d78b1e3cece.tar.gz |
spec: update
FossilOrigin-Name: 8662df4967358240dcbcbc7abc78622915b870979756aac97b7277bd6ca87a31
Diffstat (limited to 'spec')
-rw-r--r-- | spec/03_contrib_spec.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/03_contrib_spec.sh b/spec/03_contrib_spec.sh index 9c7589b..d9fcd30 100644 --- a/spec/03_contrib_spec.sh +++ b/spec/03_contrib_spec.sh @@ -17,13 +17,13 @@ Describe 'contrib scripts' It 'outputs the file contents in the given package directory' When run script ./contrib/cpt-cat "$firstpkg" The stdout should not eq "" - The line 1 of stderr should eq "$(printf '\033[1mbuild:\033[m\n')" + The line 1 of stderr should eq "build:" End It "uses the current directory for the package name if none is supplied (contrib-dummy-pkg)" cd "$CPT_PATH/contrib-dummy-pkg" || return 1 When run script "$(command -v cpt-cat)" The stdout should not eq "" - The line 1 of stderr should eq "$(printf '\033[1mbuild:\033[m\n')" + The line 1 of stderr should eq "build:" End It "exits with error if the package isn't installed" When run script ./contrib/cpt-cat somerandompackage @@ -44,13 +44,13 @@ Describe 'contrib scripts' It "outputs the given file contents in the given package directory ($1)" When run script ./contrib/cpt-cat "$firstpkg" "$1" The stdout should eq "$(cat "$CPT_ROOT/var/db/cpt/installed/$firstpkg/$1")" - The stderr should eq "$(printf '\033[1m%s:\033[m\n' "$1")" + The stderr should eq "$1:" End It "outputs the given file contents for the name of the current directory (contrib-dummy-pkg - $1)" cd "$CPT_PATH/contrib-dummy-pkg" || return 1 When run script "$(command -v cpt-cat)" "" "$1" The stdout should eq "$(cat "$CPT_ROOT/var/db/cpt/installed/${PWD##*/}/$1")" - The stderr should eq "$(printf '\033[1m%s:\033[m\n' "$1")" + The stderr should eq "$1:" End End Describe 'cpt-depends' @@ -94,6 +94,7 @@ Describe 'contrib scripts' export CPT_COMPRESS=typo When run script "$(command -v cpt-export)" contrib-dummy-pkg The stdout should eq "tarball created in $CPT_ROOT/tmp/contrib-dummy-pkg#1-1.tar.gz" + The stderr should eq "WARNING 'typo' is not a valid CPT_COMPRESS value, falling back to 'gz' " End Parameters bz2 bzip2 |