Author: jmorliaguet
Date: Sat Feb 11 19:07:25 2006
New Revision: 2361

Modified:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_ctal_test.html
Log:

- added tests removed by mistake

- began adding edge-case tests



Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_ctal_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_ctal_test.html
  (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_ctal_test.html
  Sat Feb 11 19:07:25 2006
@@ -252,6 +252,40 @@
      ctal:repeat="item f"
      ctal:content="item">...</div></div>
 
+<!-- ctal:attributes -->
+<div id="e30"><span
+     ctal:attributes="color string:red">...</span></div>
+
+<div id="e30b"><span
+     ctal:attributes="color string:red;">...</span></div>
+
+<div id="e30c"><span
+     ctal:attributes="color string:red ;">...</span></div>
+
+<div id="e30d"><span
+     ctal:attributes="color string:red; class string: large">...</span></div>
+
+<div id="e30e"><span
+     ctal:attributes="color string:red; class string: large;">...</span></div>
+
+<div id="e30f"><span
+     ctal:attributes=" color string:red; class string: large; 
">...</span></div>
+
+<div id="e30g"><span
+     ctal:attributes="color string: red; class string: large; 
">...</span></div>
+
+<!-- javascript: -->
+<div id="e31"><span ctal:content="javascript:1">...</span></div>
+
+<div id="e31b"><span ctal:content="javascript:1+1">...</span></div>
+
+<div id="e31c"><span
+                ctal:content="javascript:data['k']['l']['m']">...</span></div>
+
+<!-- edge cases -->
+
+<div id="e32"><p ctal:repeat="item javascript:[]"><span
+                 tal:content="item/id">...</span></div>
 
 <!-- Tests follow -->
 <script type="text/javascript">
@@ -434,6 +468,30 @@
       assertEqual('<div>4</div><div>5</div><div>6</div>', htmlOf("e28"));
 
       assertEqual('', htmlOf("e29"));
+    }},
+
+    testTALAttributes: function() { with(this) {
+      assertEqual('<span color="red">...</span>', htmlOf("e30"));
+      assertEqual('<span color="red">...</span>', htmlOf("e30b"));
+      assertEqual('<span color="red">...</span>', htmlOf("e30c"));
+      assertEqual('<span class="large" color="red">...</span>',
+                  htmlOf("e30d"));
+      assertEqual('<span class="large" color="red">...</span>',
+                  htmlOf("e30e"));
+      assertEqual('<span class="large" color="red">...</span>',
+                  htmlOf("e30f"));
+      assertEqual('<span class="large" color=" red">...</span>',
+                  htmlOf("e30g"));
+    }},
+
+    testJavascript: function() { with(this) {
+      assertEqual('<span>1</span>', htmlOf("e31"));
+      assertEqual('<span>2</span>', htmlOf("e31b"));
+      assertEqual('<span>10</span>', htmlOf("e31c"));
+    }},
+
+    testEdgeCases: function() { with(this) {
+      assertEqual('', htmlOf("e32"));
     }}
 
   });
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to