From 5c53c502e032e84a7b58cf6f8e903723d1d658a9 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 27 Jul 2019 13:40:45 +0200 Subject: [PATCH] Add more unit tests for rc.d scripts --- .config/shell/rc.d/test/locale-utf-8.bats | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .config/shell/rc.d/test/locale-utf-8.bats diff --git a/.config/shell/rc.d/test/locale-utf-8.bats b/.config/shell/rc.d/test/locale-utf-8.bats new file mode 100644 index 0000000..2188a00 --- /dev/null +++ b/.config/shell/rc.d/test/locale-utf-8.bats @@ -0,0 +1,15 @@ +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" ] +}