diff options
Diffstat (limited to 'spec/02_src_spec.sh')
-rw-r--r-- | spec/02_src_spec.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/02_src_spec.sh b/spec/02_src_spec.sh index be81775..2c20849 100644 --- a/spec/02_src_spec.sh +++ b/spec/02_src_spec.sh @@ -1,7 +1,8 @@ Describe 'Main toolchain' - export PATH=$PWD/src:$PATH - export CPT_ROOT=$PWD/tests/02 - export CPT_PATH=$PWD/tests/repository + PATH=$PWD/src:$PATH + CPT_ROOT=$PWD/tests/02 + CPT_PATH=$PWD/tests/repository + export PATH CPT_ROOT CPT_PATH install_dummy() { CPT_HOOK='' ./src/cpt bi dummy-pkg >/dev/null 2>&1 ;} remove_dummy() { rm -rf "${CPT_ROOT:?}/var" ;} BeforeAll install_dummy @@ -20,7 +21,7 @@ Describe 'Main toolchain' Describe '--help' It 'outputs usage information' When run script src/cpt --help - The line 1 of stderr should eq "-> Carbs Packaging Tool " + The line 1 of stderr should eq "-> Carbs Packaging Tool" End End @@ -52,7 +53,7 @@ Describe 'Main toolchain' It "expands the '$1' shortcut to '$2'" When run script src/cpt "$1" --help The status should be success - The word 2 of line 1 should eq "cpt-${2%% *}" + The word 3 of line 1 should eq "$1" End End End |