aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am9
-rw-r--r--test/Makefile.in9
-rw-r--r--test/genpot.awk1
-rw-r--r--test/genpot.ok5
5 files changed, 27 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index b221bf2f..3615b954 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-04 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (genpot): New test.
+ * genpot.awk, genpot.ok: New files.
+
2014-09-29 Arnold D. Robbins <arnold@skeeve.com>
* testext.ok: Adjusted after minor code change.
diff --git a/test/Makefile.am b/test/Makefile.am
index 1c14ea81..e547fe2c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -324,6 +324,8 @@ EXTRA_DIST = \
fwtest3.awk \
fwtest3.in \
fwtest3.ok \
+ genpot.awk \
+ genpot.ok \
gensub.awk \
gensub.in \
gensub.ok \
@@ -1009,7 +1011,7 @@ GAWK_EXT_TESTS = \
colonwarn clos1way dbugeval delsub devfd devfd1 devfd2 dumpvars exit \
fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \
functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
- gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
+ genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
include include2 indirectcall indirectcall2 \
@@ -1977,6 +1979,11 @@ filefuncs:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk -v builddir="$(abs_top_builddir)" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+genpot:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --gen-pot >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index b7e25511..a155f14c 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -570,6 +570,8 @@ EXTRA_DIST = \
fwtest3.awk \
fwtest3.in \
fwtest3.ok \
+ genpot.awk \
+ genpot.ok \
gensub.awk \
gensub.in \
gensub.ok \
@@ -1254,7 +1256,7 @@ GAWK_EXT_TESTS = \
colonwarn clos1way dbugeval delsub devfd devfd1 devfd2 dumpvars exit \
fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \
functab1 functab2 functab3 fwtest fwtest2 fwtest3 \
- gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
+ genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
include include2 indirectcall indirectcall2 \
@@ -2399,6 +2401,11 @@ filefuncs:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk -v builddir="$(abs_top_builddir)" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+genpot:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --gen-pot >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
diff --git a/test/genpot.awk b/test/genpot.awk
new file mode 100644
index 00000000..990b0b5c
--- /dev/null
+++ b/test/genpot.awk
@@ -0,0 +1 @@
+{print _"This string is so long that gawk --gen-pot will break it and lose a letter at the break."}
diff --git a/test/genpot.ok b/test/genpot.ok
new file mode 100644
index 00000000..35c0cc99
--- /dev/null
+++ b/test/genpot.ok
@@ -0,0 +1,5 @@
+#: genpot.awk:1
+msgid "This string is so long that gawk --gen-pot will break it and lose a l"
+"etter at the break."
+msgstr ""
+