Author: jmorliaguet
Date: Fri Feb 10 22:08:33 2006
New Revision: 2341

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

- more 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
  Fri Feb 10 22:08:33 2006
@@ -40,16 +40,16 @@
 
 <!-- ctal:content / ctal:attributes -->
 <div id="e6"><span ctal:content="string:D"
-                   ctal:attributes="style string:E">...</span></div>
+                   ctal:attributes="class string:E">...</span></div>
 
 <!-- ctal:condition / ctal:content / ctal:attributes -->
 <div id="e7"><span ctal:condition="ctrue"
                    ctal:content="string:F"
-                   ctal:attributes="style string:G">...</span></div>
+                   ctal:attributes="class string:G">...</span></div>
 
 <div id="e8"><span ctal:condition="cfalse"
                    ctal:content="string:H"
-                   ctal:attributes="style string:I">...</span></div>
+                   ctal:attributes="class string:I">...</span></div>
 
 <!-- ctal:omit-tag / ctal:content -->
 <div id="e9"><span ctal:omit-tag="ctrue"
@@ -68,12 +68,29 @@
                     ctal:condition="cfalse"
                     ctal:content="string:M">...</span></div>
 
+<!-- ctal:attributes -->
+<div id="e13"><a ctal:attributes="style string:N">...</a></div>
+<div id="e14"><a ctal:attributes="alt string:O; href string:P">...</a></div>
+
+<!-- ctal:attributes / tal:content -->
+<div id="e15"><a ctal:attributes="alt string:Q; href string:R"
+                 ctal:content="string:S">...</a></div>
+
+<!-- ctal:replace -->
+<div id="e16"><span ctal:replace="string:T">...</span></div>
+
+<!-- ctal:condition / ctal:replace -->
+<div id="e17"><span ctal:condition="ctrue"
+                    ctal:replace="string:U">...</span></div>
+<div id="e18"><span ctal:condition="cfalse"
+                    ctal:replace="string:V">...</span></div>
 
 <!-- Tests follow -->
 <script type="text/javascript">
 // <![CDATA[
 
   var e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14;
+  var e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27;
 
   var data = {
     a: 1,
@@ -102,6 +119,15 @@
       ctal.process_ctal(document, data);
     },
 
+    testPrivateAPI: function() { with(this) {
+      assertEqual($A(['style', 'string:1']).inspect(),
+                  $A(ctal.get_nameexpr('style string:1')).inspect());
+      assertEqual($A(['style', 'string:1']).inspect(),
+                  $A(ctal.get_nameexpr(' style   string:1')).inspect());
+      assertEqual($A(['style', 'a/b/c']).inspect(),
+                  $A(ctal.get_nameexpr(' style a/b/c')).inspect());
+    }},
+
     testTALContent: function() { with(this) {
       assertEqual('<span>1</span>', $("e0").innerHTML);
       assertEqual('<span>3</span>', $("e1").innerHTML);
@@ -115,11 +141,11 @@
     }},
 
     testTALContentTALAttributes: function() { with(this) {
-      assertEqual('<span style="E">D</span>', $("e6").innerHTML);
+      assertEqual('<span class="E">D</span>', $("e6").innerHTML);
     }},
 
     testTALConditionTALContentTALAttributes: function() { with(this) {
-      assertEqual('<span style="F">G</span>', $("e7").innerHTML);
+      assertEqual('<span class="G">F</span>', $("e7").innerHTML);
       assertEqual('', $("e8").innerHTML);
     }},
 
@@ -128,6 +154,24 @@
       assertEqual('', $("e10").innerHTML);
       assertEqual('<span>L</span>', $("e11").innerHTML);
       assertEqual('', $("e12").innerHTML);
+    }},
+
+    testTALAttributes: function() { with(this) {
+      assertEqual('<a style="N">...</a>', $("e13").innerHTML);
+      assertEqual('<a href="P" alt="O">...</a>', $("e14").innerHTML);
+    }},
+
+    testTALAttributesTALContent: function() { with(this) {
+      assertEqual('<a href="R" alt="Q">S</a>', $("e15").innerHTML);
+    }},
+
+    testTALReplace: function() { with(this) {
+      assertEqual('T', $("e16").innerHTML);
+    }},
+
+    testTALConditionTALReplace: function() { with(this) {
+      assertEqual('U', $("e17").innerHTML);
+      assertEqual('', $("e18").innerHTML);
     }}
 
   });
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to