tests: adds easy localization
This commit is contained in:
parent
9bfc587623
commit
94ada03ce4
4
tests/locales/en_US.UTF-8
Normal file
4
tests/locales/en_US.UTF-8
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export RUN_ERR='Run this script in the root of the project'
|
||||||
|
export TEST_STR='Testing utility'
|
@ -9,11 +9,13 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
. "./locales/$LANG"
|
||||||
|
|
||||||
export BIN=build/bin
|
export BIN=build/bin
|
||||||
|
|
||||||
if ! ls Makefile >/dev/null 2>&1
|
if ! ls Makefile >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
printf '%s: Run this script in the root of the project.\n' "$0" 1>&2
|
printf '%s: %s.\n' "$0" "$RUN_ERR" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -21,7 +23,7 @@ for script in tests/bonsai/*.sh; do
|
|||||||
export UTIL="$(printf '%s\n' "$script" \
|
export UTIL="$(printf '%s\n' "$script" \
|
||||||
| sed -e 's/\.sh//g' -e 's;tests\/bonsai\/;;g')"
|
| sed -e 's/\.sh//g' -e 's;tests\/bonsai\/;;g')"
|
||||||
|
|
||||||
printf '%s: %s: Testing utility.\n' "$0" "$UTIL"
|
printf '%s: %s: %s\n' "$0" "$UTIL" "$TEST_STR"
|
||||||
"$script"
|
"$script"
|
||||||
printf '\n'
|
printf '\n'
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user