aboutsummaryrefslogtreecommitdiffhomepage
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
commitd89fd37a66ab73ea7eba5e2574c4e679c4026f0b (patch)
treeae916e054118cec51b56e8eeb0f0a6f1157cb648 /tests
parentabf4da5f80ce9ba5f693aa8fc2493eb28cd8e6f3 (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