aboutsummaryrefslogtreecommitdiffstats
path: root/testcases-cons
diff options
context:
space:
mode:
Diffstat (limited to 'testcases-cons')
-rw-r--r--testcases-cons20
1 files changed, 20 insertions, 0 deletions
diff --git a/testcases-cons b/testcases-cons
index 10d827b..ec7e6cb 100644
--- a/testcases-cons
+++ b/testcases-cons
@@ -754,3 +754,23 @@ BEGIN {
:
("a" "b" "c")
(1 2 3)
+--
+40:
+$cppawk '
+#include <cons.h>
+
+BEGIN {
+ $0 = "the quick brown fox"
+ print sexp(fields())
+
+ set_fields(list(1, cons(1, 2), "foo", box_str("foo")))
+
+ for (i = 1; i <= NF; i++)
+ print $i
+}'
+:
+("the" "quick" "brown" "fox")
+1
+C1,1:12
+foo
+Tfoo