Marty Oehme
b11343b73a
Will recursively look for `*.bats` files and run them with bats-core test suite. Simple sample unit tests for existing scripts are included in `.config/shell/rc.d/test`.
15 lines
270 B
Bash
15 lines
270 B
Bash
setup() {
|
|
testfile="$BATS_TEST_DIRNAME/../locale-utf-8.sh"
|
|
}
|
|
|
|
teardown() {
|
|
export LC_ALL=""
|
|
export LANG=""
|
|
}
|
|
|
|
@test "Sets LC_ALL and LANG to en_US.utf-8" {
|
|
source $testfile
|
|
expected="en_US.utf-8"
|
|
[ "$LC_ALL" = "en_US.utf-8" ]
|
|
[ "$LANG" = "en_US.utf-8" ]
|
|
}
|