From 5cf1d4d086475575a31f57413c57c22bd6fda378 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 7 Sep 2008 11:33:13 -0400 Subject: Converting string to int --- tests/fromString.ur | 10 ++++++++++ tests/fromString.urp | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 tests/fromString.ur create mode 100644 tests/fromString.urp (limited to 'tests') diff --git a/tests/fromString.ur b/tests/fromString.ur new file mode 100644 index 00000000..d9a087e4 --- /dev/null +++ b/tests/fromString.ur @@ -0,0 +1,10 @@ +fun i2s s = + case stringToInt s of + None => 0 + | Some n => n + +fun main () : transaction page = return + Error = {cdata (show _ (i2s "Error"))}
+ 3 = {cdata (show _ (i2s "+3"))}
+ + diff --git a/tests/fromString.urp b/tests/fromString.urp new file mode 100644 index 00000000..0e6b6640 --- /dev/null +++ b/tests/fromString.urp @@ -0,0 +1,5 @@ +debug +database dbname=test +exe /tmp/webapp + +fromString -- cgit v1.2.3