mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-20 11:47:43 +02:00
Add tests for all programs --version
This commit is contained in:
parent
a3d2df5927
commit
c4af3eb637
3
test/shim/batman.sh
Normal file
3
test/shim/batman.sh
Normal file
@ -0,0 +1,3 @@
|
||||
batman() {
|
||||
"${BIN_DIR}/batman${BIN_SUFFIX}" "$@" || return $?
|
||||
}
|
3
test/shim/batwatch.sh
Normal file
3
test/shim/batwatch.sh
Normal file
@ -0,0 +1,3 @@
|
||||
batwatch() {
|
||||
"${BIN_DIR}/batwatch${BIN_SUFFIX}" "$@" || return $?
|
||||
}
|
3
test/shim/prettybat.sh
Normal file
3
test/shim/prettybat.sh
Normal file
@ -0,0 +1,3 @@
|
||||
prettybat() {
|
||||
"${BIN_DIR}/prettybat${BIN_SUFFIX}" "$@" || return $?
|
||||
}
|
0
test/snapshot/batgrep/test_version.stderr.snapshot
Normal file
0
test/snapshot/batgrep/test_version.stderr.snapshot
Normal file
3
test/snapshot/batgrep/test_version.stdout.snapshot
Normal file
3
test/snapshot/batgrep/test_version.stdout.snapshot
Normal file
@ -0,0 +1,3 @@
|
||||
batgrep
|
||||
Copyright (C) 2019-2020 eth-p | MIT License
|
||||
https://github.com/eth-p/bat-extras
|
0
test/snapshot/batman/test_version.stderr.snapshot
Normal file
0
test/snapshot/batman/test_version.stderr.snapshot
Normal file
3
test/snapshot/batman/test_version.stdout.snapshot
Normal file
3
test/snapshot/batman/test_version.stdout.snapshot
Normal file
@ -0,0 +1,3 @@
|
||||
batman
|
||||
Copyright (C) 2019-2020 eth-p | MIT License
|
||||
https://github.com/eth-p/bat-extras
|
0
test/snapshot/batwatch/test_version.stderr.snapshot
Normal file
0
test/snapshot/batwatch/test_version.stderr.snapshot
Normal file
3
test/snapshot/batwatch/test_version.stdout.snapshot
Normal file
3
test/snapshot/batwatch/test_version.stdout.snapshot
Normal file
@ -0,0 +1,3 @@
|
||||
batwatch
|
||||
Copyright (C) 2019-2020 eth-p | MIT License
|
||||
https://github.com/eth-p/bat-extras
|
3
test/snapshot/prettybat/test_version.stdout.snapshot
Normal file
3
test/snapshot/prettybat/test_version.stdout.snapshot
Normal file
@ -0,0 +1,3 @@
|
||||
prettybat
|
||||
Copyright (C) 2019-2020 eth-p | MIT License
|
||||
https://github.com/eth-p/bat-extras
|
@ -18,6 +18,9 @@ test:version() {
|
||||
description "Test 'batgrep --version'"
|
||||
snapshot stdout
|
||||
snapshot stderr
|
||||
|
||||
batgrep --version | head -n1 | cut -d' ' -f1
|
||||
batgrep --version | awk 'p{print} /^$/ { p=1 }'
|
||||
}
|
||||
|
||||
test:regular_file() {
|
||||
|
12
test/suite/batman.sh
Normal file
12
test/suite/batman.sh
Normal 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
12
test/suite/batwatch.sh
Normal 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
12
test/suite/prettybat.sh
Normal 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 }'
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user