gawk/gawk-3.1.5-test-lc_num1.patch
2008-12-11 11:25:53 +00:00

56 lines
2.0 KiB
Diff

--- test/Makefile.am.ulitest 2008-12-11 11:59:23.000000000 +0100
+++ test/Makefile.am 2008-12-11 12:00:34.000000000 +0100
@@ -307,6 +307,8 @@ EXTRA_DIST = \
intprec.ok \
iobug1.awk \
iobug1.ok \
+ lc_num1.awk \
+ lc_num1.ok \
leaddig.awk \
leaddig.ok \
leadnl.awk \
@@ -676,7 +678,7 @@ BASIC_TESTS = addcomma anchgsub argarray
fordel forsimp fsbs fsspcoln fsrs fstabplus funsemnl funsmnam funstack getline \
getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \
gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest intformat \
- intprec iobug1 leaddig leadnl litoct longsub longwrds manglprm math membug1 \
+ intprec iobug1 lc_num1 leaddig leadnl litoct longsub longwrds manglprm math membug1 \
messages minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr \
nfneg nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \
noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \
@@ -774,6 +776,12 @@ extend-msg-start:
extend-msg-end:
@echo "======== Done with gawk extension tests ========"
+lc_num1:
+ @echo $@
+ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \
+ AWKPATH=$(srcdir) $(AWK) --posix -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
# This test is a PITA because increasingly, /tmp is getting
# mounted noexec. So, we'll test it locally. Sigh.
--- /dev/null 1970-01-01 00:00:00 +0000
+++ test/lc_num1.ok 2007-09-27 10:47:26.000000000 +0200
@@ -0,0 +1 @@
+1,000,000 1000000
--- /dev/null 1970-01-01 00:00:00 +0000
+++ test/lc_num1.awk 2007-09-27 10:47:26.000000000 +0200
@@ -0,0 +1,4 @@
+# Bug reported by Ulrich Drepper.
+BEGIN {
+ printf("%'d %d\n", 1000000, 1000000)
+}
--- test/Gentests.ulitest 2005-05-11 17:28:17.000000000 +0200
+++ test/Gentests 2007-09-27 10:47:26.000000000 +0200
@@ -45,7 +45,7 @@
next
}
-/^[a-zA-Z][a-zA-Z0-9]*:/ {
+/^[a-zA-Z_][a-zA-Z0-9_]*:/ {
# remember all targets from Makefile.am
sub(/:.*/,"")
targets[$0]