summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2016-08-26 19:26:49 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2016-08-26 19:26:49 -0400
commitf0c60c01bb078da639efd3aaf33bc2f0ff996169 (patch)
tree13331d77af7df44f203eec317cc093625de46b96 /tests
parent7b2b2db168cb6b9a027981800b45e3bbb7425e33 (diff)
Import Json module from old Meta library (thanks to Edward Z. Yang for code contributions)
Diffstat (limited to 'tests')
-rw-r--r--tests/jsonTest.ur6
-rw-r--r--tests/jsonTest.urp7
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/jsonTest.ur b/tests/jsonTest.ur
new file mode 100644
index 00000000..97898de8
--- /dev/null
+++ b/tests/jsonTest.ur
@@ -0,0 +1,6 @@
+open Json
+
+fun main () : transaction page = return <xml><body>
+ {[fromJson "[1, 2, 3]" : list int]}<br/>
+ {[toJson ("hi" :: "bye\"" :: "hehe" :: [])]}
+</body></xml>
diff --git a/tests/jsonTest.urp b/tests/jsonTest.urp
new file mode 100644
index 00000000..0b606fa3
--- /dev/null
+++ b/tests/jsonTest.urp
@@ -0,0 +1,7 @@
+rewrite all JsonTest/*
+
+$/char
+$/string
+$/list
+$/json
+jsonTest