diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dynClass.ur | 2 | ||||
-rw-r--r-- | tests/dynList.ur | 22 | ||||
-rw-r--r-- | tests/dynList.urp | 4 | ||||
-rw-r--r-- | tests/dynList.urs | 1 |
4 files changed, 28 insertions, 1 deletions
diff --git a/tests/dynClass.ur b/tests/dynClass.ur index 37f931a2..7cb94d28 100644 --- a/tests/dynClass.ur +++ b/tests/dynClass.ur @@ -15,7 +15,7 @@ fun main () : transaction page = STYLE "width: 500px" else STYLE "width: 200px")} - onclick={b <- get toggle; set toggle (not b)}/> + onclick={fn _ => b <- get toggle; set toggle (not b)}/> <button dynStyle={b <- signal toggle; return (if b then diff --git a/tests/dynList.ur b/tests/dynList.ur new file mode 100644 index 00000000..09b3ee4c --- /dev/null +++ b/tests/dynList.ur @@ -0,0 +1,22 @@ +fun main () = + b <- source True; + let + fun textboxList xs = <xml> + <table> + {List.mapX (fn src => <xml><tr> + <td dynClass={return null} dynStyle={b <- signal b; + if b then + return (STYLE "width: 500px") + else + return (STYLE "width: 100px")}> + <ctextbox source={src}/> + </td></tr></xml>) xs} + </table> + </xml> + in + s <- source "foo"; + return <xml><body> + <ccheckbox source={b}/> + {textboxList (s :: s :: [])} + </body></xml> + end diff --git a/tests/dynList.urp b/tests/dynList.urp new file mode 100644 index 00000000..dc33cb28 --- /dev/null +++ b/tests/dynList.urp @@ -0,0 +1,4 @@ +rewrite all DynList/* + +$/list +dynList diff --git a/tests/dynList.urs b/tests/dynList.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/tests/dynList.urs @@ -0,0 +1 @@ +val main : unit -> transaction page |