diff --git a/test/shim/batman.sh b/test/shim/batman.sh new file mode 100644 index 0000000..01c7768 --- /dev/null +++ b/test/shim/batman.sh @@ -0,0 +1,3 @@ +batman() { + "${BIN_DIR}/batman${BIN_SUFFIX}" "$@" || return $? +} diff --git a/test/shim/batwatch.sh b/test/shim/batwatch.sh new file mode 100644 index 0000000..67fd9db --- /dev/null +++ b/test/shim/batwatch.sh @@ -0,0 +1,3 @@ +batwatch() { + "${BIN_DIR}/batwatch${BIN_SUFFIX}" "$@" || return $? +} diff --git a/test/shim/prettybat.sh b/test/shim/prettybat.sh new file mode 100644 index 0000000..590929a --- /dev/null +++ b/test/shim/prettybat.sh @@ -0,0 +1,3 @@ +prettybat() { + "${BIN_DIR}/prettybat${BIN_SUFFIX}" "$@" || return $? +} diff --git a/test/snapshot/batgrep/test_version.stderr.snapshot b/test/snapshot/batgrep/test_version.stderr.snapshot new file mode 100644 index 0000000..e69de29 diff --git a/test/snapshot/batgrep/test_version.stdout.snapshot b/test/snapshot/batgrep/test_version.stdout.snapshot new file mode 100644 index 0000000..84c919f --- /dev/null +++ b/test/snapshot/batgrep/test_version.stdout.snapshot @@ -0,0 +1,3 @@ +batgrep +Copyright (C) 2019-2020 eth-p | MIT License +https://github.com/eth-p/bat-extras diff --git a/test/snapshot/batman/test_version.stderr.snapshot b/test/snapshot/batman/test_version.stderr.snapshot new file mode 100644 index 0000000..e69de29 diff --git a/test/snapshot/batman/test_version.stdout.snapshot b/test/snapshot/batman/test_version.stdout.snapshot new file mode 100644 index 0000000..7498864 --- /dev/null +++ b/test/snapshot/batman/test_version.stdout.snapshot @@ -0,0 +1,3 @@ +batman +Copyright (C) 2019-2020 eth-p | MIT License +https://github.com/eth-p/bat-extras diff --git a/test/snapshot/batwatch/test_version.stderr.snapshot b/test/snapshot/batwatch/test_version.stderr.snapshot new file mode 100644 index 0000000..e69de29 diff --git a/test/snapshot/batwatch/test_version.stdout.snapshot b/test/snapshot/batwatch/test_version.stdout.snapshot new file mode 100644 index 0000000..51fc6ad --- /dev/null +++ b/test/snapshot/batwatch/test_version.stdout.snapshot @@ -0,0 +1,3 @@ +batwatch +Copyright (C) 2019-2020 eth-p | MIT License +https://github.com/eth-p/bat-extras diff --git a/test/snapshot/prettybat/test_version.stderr.snapshot b/test/snapshot/prettybat/test_version.stderr.snapshot new file mode 100644 index 0000000..e69de29 diff --git a/test/snapshot/prettybat/test_version.stdout.snapshot b/test/snapshot/prettybat/test_version.stdout.snapshot new file mode 100644 index 0000000..3744157 --- /dev/null +++ b/test/snapshot/prettybat/test_version.stdout.snapshot @@ -0,0 +1,3 @@ +prettybat +Copyright (C) 2019-2020 eth-p | MIT License +https://github.com/eth-p/bat-extras diff --git a/test/suite/batgrep.sh b/test/suite/batgrep.sh index 9a2d5aa..ddf3a6b 100644 --- a/test/suite/batgrep.sh +++ b/test/suite/batgrep.sh @@ -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() { diff --git a/test/suite/batman.sh b/test/suite/batman.sh new file mode 100644 index 0000000..b9b79a8 --- /dev/null +++ b/test/suite/batman.sh @@ -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 }' +} diff --git a/test/suite/batwatch.sh b/test/suite/batwatch.sh new file mode 100644 index 0000000..b44182e --- /dev/null +++ b/test/suite/batwatch.sh @@ -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 }' +} diff --git a/test/suite/prettybat.sh b/test/suite/prettybat.sh new file mode 100644 index 0000000..c5f661c --- /dev/null +++ b/test/suite/prettybat.sh @@ -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 }' +}