aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/tests
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@gmail.com>2022-10-21 16:13:27 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2022-10-25 21:40:17 +0000
commit6da51e19e347c13e133bcba68cc6100c16320a01 (patch)
treebe0bf1bd152cd310626d7c4b89552e37975833b5 /lib/libc/tests
parent9e03b903e377c75a60cbbb89ed78955769a1c804 (diff)
downloadsrc-6da51e19e347c13e133bcba68cc6100c16320a01.tar.gz
src-6da51e19e347c13e133bcba68cc6100c16320a01.zip
strfmon: Trim the SPACE from international currency symbol
The international currency symbol (int_curr_symbol) has a mandatory SPACE character as the last character. Trim this space after reading it, otherwise this extra space will always be printed when displaying the int_curr_symbol. Fixes the output when the international currency format is selected (%i). Locale Format Before After en_US.UTF-8 [%i] [USD 123.45] [USD123.45] fr_FR.UTF-8 [%i] [123,45 EUR ] [123,45 EUR] Note that the en_US.UTF-8 locale states that no space should be printed between the currency symbol and the value (sep_by_space = 0). Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
Diffstat (limited to 'lib/libc/tests')
-rw-r--r--lib/libc/tests/stdlib/strfmon_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/tests/stdlib/strfmon_test.c b/lib/libc/tests/stdlib/strfmon_test.c
index dc328e974bb8..b5b22f9a483d 100644
--- a/lib/libc/tests/stdlib/strfmon_test.c
+++ b/lib/libc/tests/stdlib/strfmon_test.c
@@ -195,8 +195,8 @@ ATF_TC_BODY(strfmon_international_currency_code, tc)
const char *locale;
const char *expected;
} tests[] = {
- { "en_US.UTF-8", "[USD 123.45]" }, /* XXX */
- { "de_DE.UTF-8", "[123,45 EUR ]" }, /* XXX */
+ { "en_US.UTF-8", "[USD123.45]" },
+ { "de_DE.UTF-8", "[123,45 EUR]" },
{ "C", "[123.45]" },
};
size_t i;