diff options
author | 2015-03-27 11:26:06 -0400 | |
---|---|---|
committer | 2015-03-27 11:26:06 -0400 | |
commit | 0b941d68e7ceba9302d57eb8083e8244602a09ce (patch) | |
tree | f74a786d667b2b1c70bb39e9a1bfb5c8f58bd5d5 /tests | |
parent | bef4dd04f19c2001561e9e889116f5a2f8905bc0 (diff) | |
parent | 8e114ff992a3e730f2eb42095267969eebf75c36 (diff) |
Merge.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dynClassB.ur | 17 | ||||
-rw-r--r-- | tests/dynClassB.urp | 5 | ||||
-rw-r--r-- | tests/files.urp | 2 | ||||
-rw-r--r-- | tests/nestedInput.ur | 10 | ||||
-rw-r--r-- | tests/style.css | 7 |
5 files changed, 40 insertions, 1 deletions
diff --git a/tests/dynClassB.ur b/tests/dynClassB.ur new file mode 100644 index 00000000..fc7aeb43 --- /dev/null +++ b/tests/dynClassB.ur @@ -0,0 +1,17 @@ +style style1 +style style2 + +fun main () : transaction page = + toggle <- source False; + return <xml> + <head> + <link rel="stylesheet" type="text/css" href="/style.css"/> + </head> + <body dynClass={b <- signal toggle; + return (if b then style1 else style2)} + dynStyle={b <- signal toggle; + return (if b then STYLE "margin: 100px" else STYLE "")}> + Body + <button onclick={fn _ => b <- get toggle; set toggle (not b)}>TOGGLE</button> + </body> + </xml> diff --git a/tests/dynClassB.urp b/tests/dynClassB.urp new file mode 100644 index 00000000..e580b035 --- /dev/null +++ b/tests/dynClassB.urp @@ -0,0 +1,5 @@ +rewrite all DynClassB/* +file /style.css style.css +allow url /style.css + +dynClassB diff --git a/tests/files.urp b/tests/files.urp index 100992e5..3683f1a8 100644 --- a/tests/files.urp +++ b/tests/files.urp @@ -1,6 +1,6 @@ rewrite all Files/* file /hello_world.txt hello.txt file /img/web.png web.png -file /files.urp files.urp +file /files.urp ./files.urp files diff --git a/tests/nestedInput.ur b/tests/nestedInput.ur new file mode 100644 index 00000000..19a73e15 --- /dev/null +++ b/tests/nestedInput.ur @@ -0,0 +1,10 @@ +fun main () : transaction page = + let + fun handler _ = return <xml/> + in + return <xml><body> + <form> + <submit action={handler}>Uh oh!</submit> + </form> + </body></xml> + end diff --git a/tests/style.css b/tests/style.css new file mode 100644 index 00000000..78b33fc2 --- /dev/null +++ b/tests/style.css @@ -0,0 +1,7 @@ +body.style1 { + background-color: blue; +} + +body.style2 { + background-color: green; +} |