aboutsummaryrefslogtreecommitdiff
path: root/spec/02_src_spec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'spec/02_src_spec.sh')
-rw-r--r--spec/02_src_spec.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/02_src_spec.sh b/spec/02_src_spec.sh
index 4685ec1..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
@@ -13,14 +14,14 @@ Describe 'Main toolchain'
VERSION=$(sed -n '/VERSION/s/.* //gp' config.mk)
It 'outputs cpt version'
When run script src/cpt --version
- The stderr should eq "-> Carbs Packaging Tools $VERSION"
+ The line 1 of stdout should eq "Carbs Packaging Tools, version $VERSION"
End
End
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