diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2022-01-07 10:20:12 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2022-01-07 10:20:12 +0000 |
commit | 33a80b9a0066db66c0ba2c020cd8dc329db39e57 (patch) | |
tree | 273e05b0e2f5d3e4ab81310a3f8c1ac82c080d1c /regress | |
parent | 39a266b9eed87e01d7f3a36e4cd354a40d12870d (diff) |
Somehow I always forget that the more global LC_ALL takes precedence over
the more specific LC_CTYPE. Things are weird that way.
The problem here was that "eval" and "LC_ALL=" were swapped, not the
priority of variables.
pointed out by naddy@
OK tb@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.sbin/snmpd/snmpd.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/regress/usr.sbin/snmpd/snmpd.sh b/regress/usr.sbin/snmpd/snmpd.sh index fe592200553..b301a40b56a 100644 --- a/regress/usr.sbin/snmpd/snmpd.sh +++ b/regress/usr.sbin/snmpd/snmpd.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: snmpd.sh,v 1.16 2022/01/05 13:27:04 martijn Exp $ +# $OpenBSD: snmpd.sh,v 1.17 2022/01/07 10:20:11 martijn Exp $ #/* # * Copyright (c) Rob Pierce <rob@openbsd.org> # * @@ -345,13 +345,13 @@ fi snmp_command="snmp get -Oqv -v2c -c non-default-rw localhost \ usmUserSecurityName.1.0" echo ======= $snmp_command -reyk="$(eval LC_CTYPE=en_US.UTF-8 $snmp_command)" +reyk="$(eval LC_ALL=en_US.UTF-8 $snmp_command)" if [ "$reyk" != "Reyk Fl${oe}ter" ] then echo "Printing of UTF-8 string in UTF-8 locale failed" FAILED=1 fi -reyk="$(eval LC_CTYPE=C $snmp_command)" +reyk="$(eval LC_ALL=C $snmp_command)" if [ "$reyk" != "Reyk Fl.ter" ] then echo "Printing of UTF-8 string in C locale failed" @@ -361,13 +361,13 @@ fi snmp_command="snmp get -Oqv -v2c -c non-default-rw localhost \ usmUserSecurityName.2.0" echo ======= $snmp_command -broken="$(eval LC_CTYPE=en_US.UTF-8 $snmp_command)" +broken="$(eval LC_ALL=en_US.UTF-8 $snmp_command)" if [ "$broken" != "br${replacement}ken" ] then echo "Printing of UTF-8 replacement character failed" FAILED=1 fi -broken="$(LC_CTYPE=C eval $snmp_command)" +broken="$(eval LC_ALL=C $snmp_command)" if [ "$broken" != "br?ken" ] then echo "Printing of question mark in C locale failed" |