aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-05-01 15:52:55 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-05-01 15:52:55 +0300
commitd5491215cec13204eacfa517d81f5696c765c29c (patch)
treea1492858f86e9a02301dd93aeb4023a9a84da482 /test
parent8972aa34f007e12c3eb3270b79d39403d80a542f (diff)
downloadegawk-d5491215cec13204eacfa517d81f5696c765c29c.tar.gz
egawk-d5491215cec13204eacfa517d81f5696c765c29c.tar.bz2
egawk-d5491215cec13204eacfa517d81f5696c765c29c.zip
Additional fix for --source, and add test case.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog6
-rw-r--r--test/Makefile.am8
-rw-r--r--test/Makefile.in8
-rw-r--r--test/sourcesplit.ok1
4 files changed, 21 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index ecac0519..b0130945 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-01 Aharon Robbins <aharon.robbins@intel.com>
+
+ * Makefile.am (sourcesplit): New test.
+ * sourcesplit.ok: New file.
+ Thanks to Hermann Peifer for the report.
+
2017-04-12 Manuel Collado <m-collado@users.sourceforge.net>
* Makefile.am (fpat6): New test.
diff --git a/test/Makefile.am b/test/Makefile.am
index 7b1b4946..161082e7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1007,6 +1007,7 @@ EXTRA_DIST = \
sortglos.ok \
sortu.awk \
sortu.ok \
+ sourcesplit.ok \
space.ok \
split_after_fpat.awk \
split_after_fpat.in \
@@ -1246,7 +1247,7 @@ GAWK_EXT_TESTS = \
profile8 profile9 profile10 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
- sortfor sortfor2 sortu split_after_fpat \
+ sortfor sortfor2 sortu sourcesplit split_after_fpat \
splitarg4 strftime strftfld \
strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
symtab7 symtab8 symtab9 symtab10 \
@@ -2388,6 +2389,11 @@ fwtest3:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/fwtest2.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+sourcesplit:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) --source='BEGIN { a = 5;' --source='print a }' >_$@ 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 bdfbdc82..52924b84 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1265,6 +1265,7 @@ EXTRA_DIST = \
sortglos.ok \
sortu.awk \
sortu.ok \
+ sourcesplit.ok \
space.ok \
split_after_fpat.awk \
split_after_fpat.in \
@@ -1503,7 +1504,7 @@ GAWK_EXT_TESTS = \
profile8 profile9 profile10 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
- sortfor sortfor2 sortu split_after_fpat \
+ sortfor sortfor2 sortu sourcesplit split_after_fpat \
splitarg4 strftime strftfld \
strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
symtab7 symtab8 symtab9 symtab10 \
@@ -2825,6 +2826,11 @@ fwtest3:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/fwtest2.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+sourcesplit:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) --source='BEGIN { a = 5;' --source='print a }' >_$@ 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/sourcesplit.ok b/test/sourcesplit.ok
new file mode 100644
index 00000000..7ed6ff82
--- /dev/null
+++ b/test/sourcesplit.ok
@@ -0,0 +1 @@
+5