]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 2 Jan 2004 00:59:51 +0000 (00:59 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 2 Jan 2004 00:59:51 +0000 (00:59 +0000)
2004-01-01  Petter Reinholdtsen  <pere@hungry.com>

* tst-fmon.data: Add simple test to check left justified currency
values in the C locale.

* tst-fmon.sh: Don't print every line.  The program already prints
the failing ones.

localedata/ChangeLog
localedata/tst-fmon.data
localedata/tst-fmon.sh
stdlib/strfmon.c

index c37ff7c1d302ae1369fa9d47ad8fc05e1ac7b59e..27632ca6d3ac23b2fbdabb95000377ec254dcb7c 100644 (file)
@@ -1,5 +1,13 @@
+2004-01-01  Petter Reinholdtsen  <pere@hungry.com>
+
+       * tst-fmon.data: Add simple test to check left justified currency
+       values in the C locale.
+
 2004-01-01  Ulrich Drepper  <drepper@redhat.com>
 
+       * tst-fmon.sh: Don't print every line.  The program already prints
+       the failing ones.
+
        * tst-fmon.c (main): Fix typo in message.
 
 2003-07-06  Petter Reinholdtsen  <pere@hungry.com>
index d7bcb1793f4960bab6cd8a110cc71010a0950162..bbcd82121355d47ef2be4635e4ffd7cfa72b8f8d 100644 (file)
@@ -44,6 +44,10 @@ C                    %#9n    1.23                     1.23
 C                      %#9n    -1.23           -        1.23
 C                      %=*#9n  1.23             ********1.23
 C                      %=*#9n  -1.23           -********1.23
+C                      %-14#5.4n       1.23    "     1.2300   "
+C                      %-14#5.4n       -1.23   "-    1.2300   "
+C                      %-14#5.4n       123.45  "   123.4500   "
+C                      %-14#5.4n       123456  " 123456.0000  "
 #
 # check both the german locale and strfmon with that data
 #
index 95dab36f74baf53932e1de451a607bc9ee1cb07c..d2bd60828055f4d86f8b1dda1f81e866975cf1c4 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Testing the implementation of strfmon(3).
-# Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2000, 2003, 2004 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
 #
@@ -45,17 +45,11 @@ while IFS=" " read locale format value expect; do
     case "$locale" in '#'*) continue ;; esac
     if [ -n "$format" ]; then
        expect=`echo "$expect" | sed 's/^\"\(.*\)\"$/\1/'`
-       if LOCPATH=${common_objpfx}localedata \
-          GCONV_PATH=${common_objpfx}/iconvdata \
-          ${run_program_prefix} ${common_objpfx}localedata/tst-fmon \
-          "$locale" "$format" "$value" "$expect" ; then
-           echo "Locale: \"${locale}\" Format: \"${format}\"" \
-                "Value: \"${value}\" Expected: \"${expect}\"  passed"
-       else
-           errcode=$?
-           echo "Locale: \"${locale}\" Format: \"${format}\"" \
-                "Value: \"${value}\" Expected: \"${expect}\"    failed"
-       fi
+       LOCPATH=${common_objpfx}localedata \
+       GCONV_PATH=${common_objpfx}/iconvdata \
+       ${run_program_prefix} ${common_objpfx}localedata/tst-fmon \
+       "$locale" "$format" "$value" "$expect" ||
+       errcode=$?
     fi
 done < $datafile
 
index 4f163165421a735aabb3bda333300dbf295713a7..b17dc9823cf682bda89a6d4341c6b21d4cced096 100644 (file)
@@ -1,5 +1,5 @@
 /* Formatting a monetary value according to the current locale.
-   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>
    and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
@@ -570,7 +570,7 @@ __strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
       info.is_long = 0;
       info.alt = 0;
       info.space = 0;
-      info.left = left;
+      info.left = 0;
       info.showsign = 0;
       info.group = group;
       info.pad = pad;