summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/crud1.html4
-rw-r--r--tests/hello.html4
-rw-r--r--tests/jsonTest.ur6
-rw-r--r--tests/jsonTest.urp7
4 files changed, 15 insertions, 6 deletions
diff --git a/tests/crud1.html b/tests/crud1.html
index 7ed26d30..92cd1942 100644
--- a/tests/crud1.html
+++ b/tests/crud1.html
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head></head><body>
+<!DOCTYPE html><html><head></head><body>
<p>Inserted with ID 1.</p>
<table border="1">
diff --git a/tests/hello.html b/tests/hello.html
index 9c249df0..4fb6f910 100644
--- a/tests/hello.html
+++ b/tests/hello.html
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!DOCTYPE html><html>
<head>
<title>Hello world!</title>
</head>
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