diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stringToTime.ur | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stringToTime.ur b/tests/stringToTime.ur new file mode 100644 index 00000000..df7b7eed --- /dev/null +++ b/tests/stringToTime.ur @@ -0,0 +1,9 @@ +fun main () : transaction page = + s <- source ""; + return <xml><body> + <ctextbox source={s}/> + <button onclick={v <- get s; alert (show (readError v : time))}/> + <button onclick={v <- get s; case read v : option time of + None => alert "Invalid" + | Some tm => alert (show tm)}/> + </body></xml> |