mirror of
https://github.com/hectorm/hblock.git
synced 2026-04-21 14:36:34 +05:30
Updated tests
This commit is contained in:
parent
6389330808
commit
1d58f9b3ff
50 changed files with 865 additions and 167 deletions
26
resources/tests/test-main-argument-invalid-short-opt.sh
Executable file
26
resources/tests/test-main-argument-invalid-short-opt.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Author: Héctor Molinero Fernández <hector@molinero.dev>
|
||||
# License: MIT, https://opensource.org/licenses/MIT
|
||||
# Repository: https://github.com/hectorm/hblock
|
||||
|
||||
set -eu
|
||||
export LC_ALL='C'
|
||||
|
||||
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "${0:?}")" && pwd -P)"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${SCRIPT_DIR:?}"/env.sh
|
||||
|
||||
main() {
|
||||
export HBLOCK_SOURCES="file://${SCRIPT_DIR:?}/sources.txt"
|
||||
|
||||
printf -- 'Test - Main - Argument: Invalid short option\n'
|
||||
actual="$(runInTestShell "${SCRIPT_DIR:?}/../../hblock" -qO- -i 'VALUE')"
|
||||
expected="$(cat -- "${0%.sh}".out)"
|
||||
if ! assertEquals "${actual?}" "${expected?}"; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
main "${@-}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue