setup tests
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,4 @@
|
|||||||
build/
|
build/
|
||||||
|
tests/**
|
||||||
|
!tests/
|
||||||
|
!tests/*.bats
|
||||||
|
|||||||
2
Justfile
Normal file
2
Justfile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
test +TESTS='test':
|
||||||
|
tests/bats/bin/bats {{ append('.bats',prepend('tests/',TESTS)) }}
|
||||||
15
tests/test.bats
Normal file
15
tests/test.bats
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
setup(){
|
||||||
|
export PATH="${PWD}:${PATH}"
|
||||||
|
load 'test_helper/bats-support/load'
|
||||||
|
load 'test_helper/bats-assert/load'
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "command found" {
|
||||||
|
run command -v args
|
||||||
|
assert_output --partial args
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "no args? you fail." {
|
||||||
|
run args
|
||||||
|
assert_failure
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user