Test for PR bin/42320.

This commit is contained in:
alnsn 2011-04-28 23:28:23 +00:00
parent 86df5467cf
commit f94fb57534
4 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1 @@
{print x + $1 + 0.125}

View File

@ -0,0 +1 @@
0,25

View File

@ -0,0 +1 @@
0,875

View File

@ -1,4 +1,4 @@
# $NetBSD: t_awk.sh,v 1.3 2010/11/07 17:51:22 jmmv Exp $
# $NetBSD: t_awk.sh,v 1.4 2011/04/28 23:28:23 alnsn Exp $
#
# Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
# All rights reserved.
@ -27,10 +27,12 @@
h_check()
{
local fname=d_$1
for sfx in in out awk; do
cp -r $(atf_get_srcdir)/d_$1.$sfx .
cp -r $(atf_get_srcdir)/$fname.$sfx .
done
atf_check -o file:d_$1.out -x "awk -f d_$1.awk < d_$1.in"
shift 1
atf_check -o file:$fname.out -x "awk $@ -f $fname.awk < $fname.in"
}
atf_test_case big_regexp
@ -82,10 +84,24 @@ multibyte_body()
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)"
}
period_body()
{
export LANG=ru_RU.KOI8-R
h_check period -v x=0.5
}
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
}