summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorKarel Zak2007-01-30 13:18:51 +0100
committerKarel Zak2007-01-30 13:52:48 +0100
commite9ce5ccc90c63cb1c499ad01800e638ece23f8b0 (patch)
tree251163add0f5966824a79409005502cb1c70e328 /tests/functions.sh
parentbuild-sys: fix ifdef ENABLE_WIDECHAR usage (diff)
downloadkernel-qcow2-util-linux-e9ce5ccc90c63cb1c499ad01800e638ece23f8b0.tar.gz
kernel-qcow2-util-linux-e9ce5ccc90c63cb1c499ad01800e638ece23f8b0.tar.xz
kernel-qcow2-util-linux-e9ce5ccc90c63cb1c499ad01800e638ece23f8b0.zip
col: getwchar() errors shouldn't be hidden
The col truncates output when multibyte errors is detected, but the problem is not reported to stderr and return code is still same like for successful exit. This stupid behaviour is fixed by this patch. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index 81168fc32..8e8b34f74 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -2,6 +2,7 @@
TS_OUTDIR="$TS_TOPDIR/output"
TS_DIFFDIR="$TS_TOPDIR/diff"
TS_EXPECTEDDIR="$TS_TOPDIR/expected"
+TS_INPUTDIR="$TS_TOPDIR/input"
function ts_skip {
echo " IGNORE ($1)"
@@ -9,6 +10,7 @@ function ts_skip {
}
function ts_init {
+ export LANG="en_US.UTF-8":
TS_NAME=$(basename $0)
if [ ! -d $TS_OUTDIR ]; then
mkdir -p $TS_OUTDIR
@@ -19,6 +21,7 @@ function ts_init {
TS_OUTPUT="$TS_OUTDIR/$TS_NAME"
TS_DIFF="$TS_DIFFDIR/$TS_NAME"
TS_EXPECTED="$TS_EXPECTEDDIR/$TS_NAME"
+ TS_INPUT="$TS_INPUTDIR/$TS_NAME"
rm -f $TS_OUTPUT
@@ -35,7 +38,7 @@ function ts_finalize {
res=1
fi
else
- res=0
+ res=1
fi
else
echo " IGNORE (expected output undefined)"