summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-03 16:54:04 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-03 16:54:04 -0500
commit433e33875836ed5d1277a05a1c2a4ed035e89929 (patch)
treeae916e054118cec51b56e8eeb0f0a6f1157cb648 /tests
parent62f89416cc96bf36d598752064b3a70f4aafac9f (diff)
Increase precision for rendering floats to SQL
Diffstat (limited to 'tests')
-rw-r--r--tests/sqlprecision.ur12
-rw-r--r--tests/sqlprecision.urp5
-rw-r--r--tests/sqlprecision.urs1
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/sqlprecision.ur b/tests/sqlprecision.ur
new file mode 100644
index 00000000..0391ea04
--- /dev/null
+++ b/tests/sqlprecision.ur
@@ -0,0 +1,12 @@
+table t : { N : float }
+
+fun insert r =
+ dml (INSERT INTO t (N) VALUES ({[readError r.N]}));
+ return <xml/>
+
+fun main () = return <xml><body>
+ <form>
+ <textbox{#N}/>
+ <submit action={insert}/>
+ </form>
+</body></xml>
diff --git a/tests/sqlprecision.urp b/tests/sqlprecision.urp
new file mode 100644
index 00000000..7a396b50
--- /dev/null
+++ b/tests/sqlprecision.urp
@@ -0,0 +1,5 @@
+database dbname=test
+rewrite url Sqlprecision/*
+sql sqlprecision.sql
+
+sqlprecision
diff --git a/tests/sqlprecision.urs b/tests/sqlprecision.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/sqlprecision.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page