Add tests for all programs --version

This commit is contained in:
Ethan P 2020-04-08 03:11:56 -07:00
parent a3d2df5927
commit c4af3eb637
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA
15 changed files with 60 additions and 0 deletions

3
test/shim/batman.sh Normal file
View File

@ -0,0 +1,3 @@
batman() {
"${BIN_DIR}/batman${BIN_SUFFIX}" "$@" || return $?
}

3
test/shim/batwatch.sh Normal file
View File

@ -0,0 +1,3 @@
batwatch() {
"${BIN_DIR}/batwatch${BIN_SUFFIX}" "$@" || return $?
}

3
test/shim/prettybat.sh Normal file
View File

@ -0,0 +1,3 @@
prettybat() {
"${BIN_DIR}/prettybat${BIN_SUFFIX}" "$@" || return $?
}

View File

@ -0,0 +1,3 @@
batgrep
Copyright (C) 2019-2020 eth-p | MIT License
https://github.com/eth-p/bat-extras

View File

@ -0,0 +1,3 @@
batman
Copyright (C) 2019-2020 eth-p | MIT License
https://github.com/eth-p/bat-extras

View File

@ -0,0 +1,3 @@
batwatch
Copyright (C) 2019-2020 eth-p | MIT License
https://github.com/eth-p/bat-extras

View File

@ -0,0 +1,3 @@
prettybat
Copyright (C) 2019-2020 eth-p | MIT License
https://github.com/eth-p/bat-extras

View File

@ -18,6 +18,9 @@ test:version() {
description "Test 'batgrep --version'" description "Test 'batgrep --version'"
snapshot stdout snapshot stdout
snapshot stderr snapshot stderr
batgrep --version | head -n1 | cut -d' ' -f1
batgrep --version | awk 'p{print} /^$/ { p=1 }'
} }
test:regular_file() { test:regular_file() {

12
test/suite/batman.sh Normal file
View File

@ -0,0 +1,12 @@
setup() {
use_shim 'batman'
}
test:version() {
description "Test 'batman --version'"
snapshot stdout
snapshot stderr
batman --version | head -n1 | cut -d' ' -f1
batman --version | awk 'p{print} /^$/ { p=1 }'
}

12
test/suite/batwatch.sh Normal file
View File

@ -0,0 +1,12 @@
setup() {
use_shim 'batwatch'
}
test:version() {
description "Test 'batwatch --version'"
snapshot stdout
snapshot stderr
batwatch --version | head -n1 | cut -d' ' -f1
batwatch --version | awk 'p{print} /^$/ { p=1 }'
}

12
test/suite/prettybat.sh Normal file
View File

@ -0,0 +1,12 @@
setup() {
use_shim 'prettybat'
}
test:version() {
description "Test 'prettybat --version'"
snapshot stdout
snapshot stderr
prettybat --version | head -n1 | cut -d' ' -f1
prettybat --version | awk 'p{print} /^$/ { p=1 }'
}