aboutsummaryrefslogtreecommitdiffstats
path: root/test/split_after_fpat.awk
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2014-04-13 14:30:56 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2014-04-13 14:30:56 -0400
commit94e3f93395de538d73826e128281a3ea9591a5a9 (patch)
tree45257e4b024537c5e0e5a3037a99ea9765583c99 /test/split_after_fpat.awk
parentc4300d657ba49db0b6d0f0884f41a29622edc58b (diff)
parenta4b59faf911743b30f2e6e979c4f9c1ea0669ac3 (diff)
downloadegawk-94e3f93395de538d73826e128281a3ea9591a5a9.tar.gz
egawk-94e3f93395de538d73826e128281a3ea9591a5a9.tar.bz2
egawk-94e3f93395de538d73826e128281a3ea9591a5a9.zip
Merge branch 'master' into select
Diffstat (limited to 'test/split_after_fpat.awk')
-rw-r--r--test/split_after_fpat.awk11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/split_after_fpat.awk b/test/split_after_fpat.awk
new file mode 100644
index 00000000..7e7cfd99
--- /dev/null
+++ b/test/split_after_fpat.awk
@@ -0,0 +1,11 @@
+BEGIN { FPAT = "\"[^\"]*\"" }
+
+{ print $1 }
+
+END { f("hi there") }
+
+function f (p, a, n, i)
+{
+ n = split(p,a)
+ print n ; for (i=1; i<=n; i++) print a[i]
+}