aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog32
-rw-r--r--localedata/Makefile5
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n01y1228
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n02n4028
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n10y3128
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n11y4128
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n12y1128
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n20n3228
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n30y2028
-rw-r--r--localedata/tst-fmon-locales/tstfmon_n41n0028
-rw-r--r--localedata/tst-fmon-locales/tstfmon_y01y1028
-rw-r--r--localedata/tst-fmon-locales/tstfmon_y02n2228
-rw-r--r--localedata/tst-fmon-locales/tstfmon_y22n4228
-rw-r--r--localedata/tst-fmon-locales/tstfmon_y30y2128
-rw-r--r--localedata/tst-fmon-locales/tstfmon_y32n3128
-rw-r--r--localedata/tst-fmon-locales/tstfmon_y40y0028
-rw-r--r--localedata/tst-fmon-locales/tstfmon_y42n2128
-rw-r--r--localedata/tst-fmon.data111
-rwxr-xr-xlocaledata/tst-fmon.sh20
-rw-r--r--stdlib/strfmon.c102
20 files changed, 643 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index c26aa4eb2a..2c6ecb0ad7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+2000-04-09 Ulrich Drepper <drepper@redhat.com>
+
+ * localedata/Makefile: Add rules to clean up directories created by
+ new strfmon tests.
+
+2000-04-09 Geoff Clare <gwc@unisoft.com>
+
+ * localedata/tst-fmon.data: Added new tests for strfmon()
+ using test locales with all combinations of cs_precedes,
+ sign_posn and sep_by_space.
+ * localedata/tst-fmon.sh: Updated to support the new tests.
+ * localedata/tst-fmon-locales/tstfmon_n01y12: New file containing
+ the localedef source for the new strfmon() test locale.
+ * localedata/tst-fmon-locales/tstfmon_n02n40: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_n10y31: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_n11y41: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_n12y11: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_n20n32: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_n30y20: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_n41n00: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_y01y10: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_y02n22: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_y22n42: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_y30y21: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_y32n31: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_y40y00: Likewise.
+ * localedata/tst-fmon-locales/tstfmon_y42n21: Likewise.
+
+ * stdlib/strfmon.c: Correct problems with missing or extra
+ spaces for unusual combinations of sign_posn and sep_by_space.
+ Improved left-precision alignment code.
+
2000-04-07 Andreas Jaeger <aj@suse.de>
* posix/Makefile (CFLAGS-regex.c): Remove DEBUG.
diff --git a/localedata/Makefile b/localedata/Makefile
index 928d96a0bc..7e211699a8 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -45,9 +45,12 @@ ld-test-names := test1 test2 test3 test4 test5
ld-test-srcs := $(addprefix tests/,$(addsuffix .cm,$(ld-test-names)) \
$(addsuffix .def,$(ld-test-names)))
+fmon-tests = n01y12 n02n40 n10y31 n11y41 n12y11 n20n32 n30y20 n41n00 \
+ y01y10 y02n22 y22n42 y30y21 y32n31 y40y00 y42n21
+
generated := $(test-input) $(test-output)
generated-dirs := $(basename $(test-input)) en_US $(ld-test-names) tt_TT\
- de_DE.437
+ de_DE.437 $(addprefix tstfmon_,$(fmon-tests))
distribute := CHECKSUMS README SUPPORTED ChangeLog \
$(charmaps) $(locales) $(repertoiremaps) \
diff --git a/localedata/tst-fmon-locales/tstfmon_n01y12 b/localedata/tst-fmon-locales/tstfmon_n01y12
new file mode 100644
index 0000000000..f8fac3ca30
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n01y12
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 0
+p_sep_by_space 1
+n_cs_precedes 1
+n_sign_posn 1
+n_sep_by_space 2
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_n02n40 b/localedata/tst-fmon-locales/tstfmon_n02n40
new file mode 100644
index 0000000000..be9ecf374f
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n02n40
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 0
+p_sep_by_space 2
+n_cs_precedes 0
+n_sign_posn 4
+n_sep_by_space 0
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_n10y31 b/localedata/tst-fmon-locales/tstfmon_n10y31
new file mode 100644
index 0000000000..47fe7b4241
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n10y31
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 1
+p_sep_by_space 0
+n_cs_precedes 1
+n_sign_posn 3
+n_sep_by_space 1
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_n11y41 b/localedata/tst-fmon-locales/tstfmon_n11y41
new file mode 100644
index 0000000000..3a7f5dcf7f
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n11y41
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 1
+p_sep_by_space 1
+n_cs_precedes 1
+n_sign_posn 4
+n_sep_by_space 1
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_n12y11 b/localedata/tst-fmon-locales/tstfmon_n12y11
new file mode 100644
index 0000000000..c8cb113ffc
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n12y11
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 1
+p_sep_by_space 2
+n_cs_precedes 1
+n_sign_posn 1
+n_sep_by_space 1
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_n20n32 b/localedata/tst-fmon-locales/tstfmon_n20n32
new file mode 100644
index 0000000000..679d1fe9a6
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n20n32
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 2
+p_sep_by_space 0
+n_cs_precedes 0
+n_sign_posn 3
+n_sep_by_space 2
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_n30y20 b/localedata/tst-fmon-locales/tstfmon_n30y20
new file mode 100644
index 0000000000..4d7f761078
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n30y20
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 3
+p_sep_by_space 0
+n_cs_precedes 1
+n_sign_posn 2
+n_sep_by_space 0
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_n41n00 b/localedata/tst-fmon-locales/tstfmon_n41n00
new file mode 100644
index 0000000000..c50cd5642c
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_n41n00
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sign_posn 4
+p_sep_by_space 1
+n_cs_precedes 0
+n_sign_posn 0
+n_sep_by_space 0
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_y01y10 b/localedata/tst-fmon-locales/tstfmon_y01y10
new file mode 100644
index 0000000000..fa3dffec88
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_y01y10
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sign_posn 0
+p_sep_by_space 1
+n_cs_precedes 1
+n_sign_posn 1
+n_sep_by_space 0
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_y02n22 b/localedata/tst-fmon-locales/tstfmon_y02n22
new file mode 100644
index 0000000000..9a1dd61a13
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_y02n22
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign ""
+negative_sign "<O></><D>"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sign_posn 0
+p_sep_by_space 2
+n_cs_precedes 0
+n_sign_posn 2
+n_sep_by_space 2
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_y22n42 b/localedata/tst-fmon-locales/tstfmon_y22n42
new file mode 100644
index 0000000000..f12d533914
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_y22n42
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sign_posn 2
+p_sep_by_space 2
+n_cs_precedes 0
+n_sign_posn 4
+n_sep_by_space 2
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_y30y21 b/localedata/tst-fmon-locales/tstfmon_y30y21
new file mode 100644
index 0000000000..d7775833dd
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_y30y21
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sign_posn 3
+p_sep_by_space 0
+n_cs_precedes 1
+n_sign_posn 2
+n_sep_by_space 1
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_y32n31 b/localedata/tst-fmon-locales/tstfmon_y32n31
new file mode 100644
index 0000000000..093341ca46
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_y32n31
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sign_posn 3
+p_sep_by_space 2
+n_cs_precedes 0
+n_sign_posn 3
+n_sep_by_space 1
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_y40y00 b/localedata/tst-fmon-locales/tstfmon_y40y00
new file mode 100644
index 0000000000..5e4cf12b2a
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_y40y00
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sign_posn 4
+p_sep_by_space 0
+n_cs_precedes 1
+n_sign_posn 0
+n_sep_by_space 0
+END LC_MONETARY
diff --git a/localedata/tst-fmon-locales/tstfmon_y42n21 b/localedata/tst-fmon-locales/tstfmon_y42n21
new file mode 100644
index 0000000000..3dcf4a38d8
--- /dev/null
+++ b/localedata/tst-fmon-locales/tstfmon_y42n21
@@ -0,0 +1,28 @@
+repertoiremap mnemonic.ds
+
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol "<U><S><D><SP>"
+currency_symbol "<DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign "<+>"
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sign_posn 4
+p_sep_by_space 2
+n_cs_precedes 0
+n_sign_posn 2
+n_sep_by_space 1
+END LC_MONETARY
diff --git a/localedata/tst-fmon.data b/localedata/tst-fmon.data
index f70dea0318..f1084ca685 100644
--- a/localedata/tst-fmon.data
+++ b/localedata/tst-fmon.data
@@ -19,7 +19,7 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# The format of this file is pretty simple: Each line contains a test
-# for strfmon. Fields are seperated by TABs. Lines that start with a
+# for strfmon. Fields are separated by TABs. Lines that start with a
# '#' are comments and are ignored.
#
# Field Description
@@ -126,3 +126,112 @@ en_US.ISO-8859-1 %!(#5n 3456.781 3,456.78
en_US.ISO-8859-1 %#5n 123.45 $ 123.45
en_US.ISO-8859-1 %#5n -123.45 -$ 123.45
en_US.ISO-8859-1 %#