summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/doubleDyn.ur22
-rw-r--r--tests/doubleDyn.urp4
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/doubleDyn.ur b/tests/doubleDyn.ur
new file mode 100644
index 00000000..97cf57d8
--- /dev/null
+++ b/tests/doubleDyn.ur
@@ -0,0 +1,22 @@
+style linktitle
+style topic
+
+fun main () : transaction page =
+ text <- source "Lorem ipsum dolor sit amet";
+ cls <- source linktitle;
+ return <xml>
+ <head>
+ <title>Dynamic CSS class test</title>
+ <link href="http://adam.chlipala.net/style.css" rel="stylesheet" type="text/css" media="all"/>
+ </head>
+ <body>
+ <dyn signal={t <- signal text;
+ return <xml><div dynClass={signal cls}>{[t]}</div></xml>}/>
+ <div dynClass={signal cls}>
+ <dyn signal={t <- signal text; return (txt t)}/>
+ </div>
+ <button value="Style1" onclick={set cls linktitle}/>
+ <button value="Style2" onclick={set cls topic}/>
+ <ctextbox source={text}/>
+ </body>
+ </xml>
diff --git a/tests/doubleDyn.urp b/tests/doubleDyn.urp
new file mode 100644
index 00000000..70522905
--- /dev/null
+++ b/tests/doubleDyn.urp
@@ -0,0 +1,4 @@
+allow url http://adam.chlipala.net/style.css
+rewrite all DoubleDyn/*
+
+doubleDyn