2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2018 Nexenta Systems, Inc.
17 * Note that this file is easiest edited with a UTF-8 capable editor,
18 * as there are embedded UTF-8 symbols in some of the strings.
32 "C", "%a", 3.2, "0x1.99999a0000000p+1",
33 "C", "%e", 3.2, "3.200000e+00",
34 "C", "%f", 3.2, "3.200000",
35 "C", "%g", 3.2, "3.2",
36 "ar_AE.UTF-8", "%a", 3.2, "0x1٫99999a0000000p+1",
37 "ar_AE.UTF-8", "%e", 3.2, "3٫200000e+00",
38 "ar_AE.UTF-8", "%f", 3.2, "3٫200000",
39 "ar_AE.UTF-8", "%g", 3.2, "3٫2",
40 "en_US.UTF-8", "%a", 3.2, "0x1.99999a0000000p+1",
41 "en_US.UTF-8", "%e", 3.2, "3.200000e+00",
42 "en_US.UTF-8", "%f", 3.2, "3.200000",
43 "en_US.UTF-8", "%g", 3.2, "3.2",
44 "ru_RU.UTF-8", "%a", 3.2, "0x1,99999a0000000p+1",
45 "ru_RU.UTF-8", "%e", 3.2, "3,200000e+00",
46 "ru_RU.UTF-8", "%f", 3.2, "3,200000",
47 "ru_RU.UTF-8", "%g", 3.2, "3,2",
57 for (i
= 0; fpconv
[i
].locale
!= NULL
; i
++) {
58 if (setlocale(LC_ALL
, fpconv
[i
].locale
) == NULL
)
59 err(1, "failed to set locale to %s", fpconv
[i
].locale
);
61 (void) sprintf(buf
, fpconv
[i
].convspec
, fpconv
[i
].fp
);
62 if (strcmp(fpconv
[i
].expected
, buf
) != 0) {
63 errx(1, "locale=%s, convspec=%s, expected=%s, got=%s",
64 fpconv
[i
].locale
, fpconv
[i
].convspec
,
65 fpconv
[i
].expected
, buf
);