NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/42320: LC_NUMERIC in awk is not POSIX compliant



Please add the atf test for this issue:

$ cat tests/util/awk/period.awk
{print $1 + 0.01}
$ cat tests/util/awk/period.in
0,02
$ cat tests/util/awk/period.out
0,03
$ cvs diff tests/util/awk/t_awk.sh
Index: tests/util/awk/t_awk.sh
===================================================================
RCS file: /cvsroot/src/tests/util/awk/t_awk.sh,v
retrieving revision 1.2
diff -u -r1.2 t_awk.sh
--- tests/util/awk/t_awk.sh     4 Jun 2010 08:39:41 -0000       1.2
+++ tests/util/awk/t_awk.sh     22 Sep 2010 00:42:16 -0000
@@ -86,10 +86,25 @@
        h_check toupper
 }
 
+atf_test_case period
+period_head()
+{
+       atf_set "descr" "Checks that the period character is recognised" \
+                       "in awk program regardless of locale (bin/42320)"
+       atf_set "use.fs" "true"
+}
+period_body()
+{
+       export LANG=ru_RU.KOI8-R
+
+       h_check period
+}
+
 atf_init_test_cases()
 {
        atf_add_test_case big_regexp
        atf_add_test_case end
        atf_add_test_case string1
        atf_add_test_case multibyte
+       atf_add_test_case period
 }


Home | Main Index | Thread Index | Old Index