summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-12-30 10:08:43 -0500
committerAdrian Thurston <thurston@complang.org>2012-12-30 10:08:43 -0500
commitbf2212dba3e1825f8f2cccd64fe2af14a1d76521 (patch)
treefd138a2f488350aae4e16550572120831216d6bc /test
parent7db01e426f3d5231bdfb1ec46bbed32981e1e62f (diff)
downloadcolm-bf2212dba3e1825f8f2cccd64fe2af14a1d76521.tar.gz
test case for printing to stdout
Diffstat (limited to 'test')
-rw-r--r--test/prints.exp1
-rw-r--r--test/prints.in1
-rw-r--r--test/prints.lm12
3 files changed, 14 insertions, 0 deletions
diff --git a/test/prints.exp b/test/prints.exp
new file mode 100644
index 00000000..c849c57d
--- /dev/null
+++ b/test/prints.exp
@@ -0,0 +1 @@
+fd stdout: a b c
diff --git a/test/prints.in b/test/prints.in
new file mode 100644
index 00000000..3774da60
--- /dev/null
+++ b/test/prints.in
@@ -0,0 +1 @@
+a b c
diff --git a/test/prints.lm b/test/prints.lm
new file mode 100644
index 00000000..cb8e37e5
--- /dev/null
+++ b/test/prints.lm
@@ -0,0 +1,12 @@
+lex
+ token word /[a-z]+/
+ ignore /[\t\n ]+/
+end
+
+def start
+ [word*]
+
+parse Start: start[stdin]
+
+prints( stderr 'fd stderr: ' Start.tree '\n' )
+prints( stdout 'fd stdout: ' Start.tree '\n' )