Author: ben
Date: 2007-07-05 14:52:20 -0700 (Thu, 05 Jul 2007)
New Revision: 5598

Modified:
   openlaszlo/branches/4.0/
   openlaszlo/branches/4.0/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
   
openlaszlo/branches/4.0/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java
   openlaszlo/branches/4.0/build-tools/runlztest.sh
   openlaszlo/branches/4.0/test/smoke/data.lzl
   openlaszlo/branches/4.0/test/smoke/lzunit-test.lzl
   openlaszlo/branches/4.0/test/smoke/simple.lzx
   openlaszlo/branches/4.0/test/smoke/smokecheck.lzx
Log:
Merged revisions 
4610-4623,4625-4651,4655-4659,4661-4664,4666-4672,4674-4681,4683-4692,4694-4699,4701-4713,4715-4716,4719-4732,4734-4738,4740-4741,4743-4744,4746-4747,4751-4753,4757-4758,4760-4762,4765,4768-4769,4771-4779,4781,4783,4785-4788,4791-4794,4796-4797,4799-4804,4808-4810,4812-4814,4816-4819,4822,4824-4832,4838-4841,4843-4844,4850-4853,4857,4859,4861-4865,4867,4871-4874,4877-4878,4880-4891,4894-4896,4899-4900,4902-4911,4913-4918,4920,4926-4930,4936,4942-4948,4950-4953,4955-4957,4960-4964,4966-4968,4971-4978,4981,4983-4985,4987-4989,4991-4998,5002-5013,5016-5026,5029-5030,5032,5034-5040,5044,5051-5052,5054-5060,5062-5063,5066,5070,5072,5076-5079,5085-5095,5104-5105,5107-5112,5114,5118-5121,5125,5131-5139,5142,5144,5146-5147,5149-5150,5152,5158-5159,5161-5167,5171-5173,5176-5189,5191,5193,5197-5198,5202-5207,5209-5211,5213,5216,5218-5224,5227,5230-5231,5233-5234,5238-5245,5247-5248,5250-5251,5255-5259,5261-5268,5270-5272,5276-5277,5280-5284,5286,5288-5291,5299-5303,53!
 
05-5308,5311-5312,5314-5316,5318,5321-5322,5326-5327,5329,5331-5332,5335-5336,5339,5341-5342,5345-5347,5349-5366,5368-5369,5372-5374,5379-5380,5382-5383,5386,5389-5390,5392,5395-5401,5403-5406,5408-5419,5421,5424-5425,5427-5431,5434-5435,5437-5438,5441-5447,5449-5453,5457-5460,5462-5463,5466,5468-5469,5471,5473-5478,5481-5487,5490-5495,5497-5501,5503,5505-5512,5514-5523,5527-5529,5531-5533,5536-5537,5539-5551,5554-5555,5557-5559,5561-5563,5565-5567,5569-5589,5593-5595,5597
 via svnmerge from 
http://svn.openlaszlo.org/openlaszlo/branches/legals

.......
  r5567 | ben | 2007-07-01 19:49:41 -0700 (Sun, 01 Jul 2007) | 31 lines
  
  Change 20070628-ben-n by [EMAIL PROTECTED] on 2007-06-28 16:08:38 PDT
      in /Users/ben/src/svn/openlaszlo/branches/legals
      for http://svn.openlaszlo.org/openlaszlo/branches/legals
  
  Summary: Explain expected errors in smokecheck debug output
  
  New Features:
  
  Bugs Fixed: LPP-4184  test/smoke/smokecheck.lzx reports success, but log 
contains errors
  
  Technical Reviewer: ptw 
  QA Reviewer: mkratt (pending)
  Doc Reviewer: (pending)
  
  Documentation:
  The expected errors in the smokecheck used to just print red ERROR output. 
  This changeset adds informative output for each expected error. 
  Make IntentionalFailures match IntentionalErrors and add some 
  more explanation as to why some 'expected' errors don't show up
  The smokecheck currently passes in both swf8 and dhtml. 
  
  Release Notes:
  
  Details:
      
  
  Tests:
  http://localhost:8080/legals/test/smoke/smokecheck.lzx?lzr=swf8&debug=true 
(passes)
  http://localhost:8080/legals/test/smoke/smokecheck.lzx?lzr=dhtml&debug=true 
(fails)
.......
  r5579 | ptw | 2007-07-02 11:05:55 -0700 (Mon, 02 Jul 2007) | 31 lines
  
  ?\239?\187?\191Change 20070702-ptw-D by [EMAIL PROTECTED] on 2007-07-02 
09:05:57 EDT
      in /Users/ptw/OpenLaszlo/legals
      for http://svn.openlaszlo.org/openlaszlo/branches/legals
  
  Summary: Preserve Debug.printLength when overriding
  
  Bugs Fixed:
  LPP-4234 'DHTML Debug.inspect clobbers printLength'
  
  Technical Reviewer: ben (Message-Id: <[EMAIL PROTECTED]>)
  QA Reviewer: frisco (pending)
  
  Details:
      Guard with a try/catch.  Also, move length computation out of
      object test so length will be displayed for strings.
  
  Tests:
      ant lztest, smokecheck
  
      lzx> Debug.printLength = 24
      24
      lzx> "A long string that will be abbreviated"
      ?\194?\171string(38)| 'A l...?\194?\187
      lzx> Debug.inspect('A long string that will be abbreviated')
      'A long string that will be abbreviated'
      ?\194?\171string(38)| 'A l...?\194?\187
      lzx> Debug.printLength
      24
      lzx> 
.......
  r5580 | ptw | 2007-07-02 13:54:47 -0700 (Mon, 02 Jul 2007) | 13 lines
  
  Change 20070702-ptw-1 by [EMAIL PROTECTED] on 2007-07-02 16:48:26 EDT
      in /Users/ptw/OpenLaszlo/legals
      for http://svn.openlaszlo.org/openlaszlo/branches/legals
  
  Summary: Remove debugging printf
  
  Details:
      Stray debug print left in source
  
  Tests:
      ant lztest
.......
  r5595 | ben | 2007-07-05 14:02:58 -0700 (Thu, 05 Jul 2007) | 50 lines
  
  Change 20070705-ben-C by [EMAIL PROTECTED] on 2007-07-05 14:01:24 PDT
      in /Users/ben/src/svn/openlaszlo/branches/legals
      for http://svn.openlaszlo.org/openlaszlo/branches/legals
  
  Summary: improvements to runlztest to run more tests, more quietly
  
  Bugs Fixed: LPP-4236 runlztest should run to completion, not bail on first 
failure
  
  Technical Reviewer: hqm (pending)
  QA Reviewer: frisco
  Doc Reviewer: (pending)
  
  Documentation:
  This change tweaks build-tools/runlztest.sh to be less verbose about
  standard operations, and to run an entire batch of tests. Before this
  change, runlztest stopped after a single test failure. Now it runs
  all tests, then reports a list of all tests that failed. 
  
  Also removed some sleeps so that skipped tests take approx no time,
  instead of 2 seconds per skipped test. 
  
  
  Tests:
  When there are tests in the smokecheck which fail in lztest:
  $ build-tools/runlztest.sh
  Output should end with something like:
  ERRORS in tests 
0,test/lztest/lztest-lzdataelement.lzx,test/lztest/lztest-view.lzx,test/lztest/lztest-textheight.lzx
  
  When the smokecheck fails in lztest, the output of 
  $ ant lztest
  should end with something like this:
  [exec] error: In suite Test LzURL, test 0, failed assertion: FAIL: 
assertTrue('false') failed
  [exec] error: Failed 1 suites, Test LzURL
  [exec] FAILED a test in runlztest.sh: test/lztest/lztest-lzurl.lzx
  [exec] ERRORS in tests: 0,test/lztest/lztest-lzurl.lzx
  [exec] ERRORS in tests 0,test/lztest/lztest-lzurl.lzx
  
  BUILD FAILED
  /Users/ben/src/svn/openlaszlo/branches/legals-clean/build.xml:877: exec 
returned: 1
  
  
  When the smokecheck passes in lztest, the output of 
  $ ant lztest
  should end with...
  [exec] no errors. done.
  
  BUILD SUCCESSFUL
  Total time: 2 minutes 26 seconds
.......



Property changes on: openlaszlo/branches/4.0
___________________________________________________________________
Name: svnmerge-integrated
   - 
/openlaszlo/branches/legals:1-4607,4609-4664,4666-4716,4718-4744,4746-4749,4751-4755,4757-4758,4760-4766,4768-4781,4783,4785-4822,4824-4832,4835-4836,4838-4841,4843-4844,4848-4867,4871-4874,4877-4891,4894-4918,4920,4923,4925-4932,4934-4936,4938-4939,4942-4953,4955-4957,4960-4964,4966-4969,4971-4978,4981,4983-4985,4987-4989,4991-4998,5000,5002-5013,5016-5042,5044,5051-5052,5054-5060,5062-5066,5070,5072,5076-5079,5081,5085-5096,5101-5102,5104-5105,5107-5112,5114,5118-5121,5123,5125-5142,5144-5152,5156-5173,5176-5191,5193-5200,5202-5207,5209-5214,5216-5225,5227-5231,5233-5235,5237-5245,5247-5251,5253-5273,5276-5277,5279-5291,5295-5296,5298-5308,5311-5316,5318-5319,5321-5322,5324,5326-5329,5331-5332,5335-5336,5338-5366,5368-5370,5372-5380,5382-5390,5392-5406,5408-5419,5421-5422,5424-5453,5455-5469,5471-5495,5497-5523,5527-5529,5531-5533,5536-5537,5539-5551,5554-5560
   + 
/openlaszlo/branches/legals:1-4607,4609-4664,4666-4716,4718-4744,4746-4749,4751-4755,4757-4758,4760-4766,4768-4781,4783,4785-4822,4824-4832,4835-4836,4838-4841,4843-4844,4848-4867,4871-4874,4877-4891,4894-4918,4920,4923,4925-4932,4934-4936,4938-4939,4942-4953,4955-4957,4960-4964,4966-4969,4971-4978,4981,4983-4985,4987-4989,4991-4998,5000,5002-5013,5016-5042,5044,5051-5052,5054-5060,5062-5066,5070,5072,5076-5079,5081,5085-5096,5101-5102,5104-5105,5107-5112,5114,5118-5121,5123,5125-5142,5144-5152,5156-5173,5176-5191,5193-5200,5202-5207,5209-5214,5216-5225,5227-5231,5233-5235,5237-5245,5247-5251,5253-5273,5276-5277,5279-5291,5295-5296,5298-5308,5311-5316,5318-5319,5321-5322,5324,5326-5329,5331-5332,5335-5336,5338-5366,5368-5370,5372-5380,5382-5390,5392-5406,5408-5419,5421-5422,5424-5453,5455-5469,5471-5495,5497-5523,5527-5529,5531-5533,5536-5537,5539-5551,5554-5563,5565-5567,5569-5589,5593-5595,5597

Modified: 
openlaszlo/branches/4.0/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
===================================================================
--- openlaszlo/branches/4.0/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js  
2007-07-05 21:34:21 UTC (rev 5597)
+++ openlaszlo/branches/4.0/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js  
2007-07-05 21:52:20 UTC (rev 5598)
@@ -7,8 +7,8 @@
 Debug.objectClassPattern = new RegExp('^\\[object\\s+(\\w+)\\]$');
 Debug.nativeClassPattern = new RegExp('^\\[(\\w+)\\]$');
 /**
-  * @access private
-  */
+ * @access private
+ */
 Debug.__typeof = function (thing) {
   try {
     // default type
@@ -66,14 +66,13 @@
           n = '\u00bf' + n + '?';
         }
       }
-
-      // Show dimensions, if applicable
-      try {
-        if (typeof(thing.length) == 'number') {
-          n += '(' + thing.length + ')';
-        }
-      } catch (e) {};
     }
+    // Show dimensions, if applicable
+    try {
+      if (thing && typeof(thing.length) == 'number') {
+        n += '(' + thing.length + ')';
+      }
+    } catch (e) {};
   }
   catch (e) {
     try {
@@ -85,14 +84,14 @@
   }
 
   return n;
-}
+};
 
 
 Debug.functionNamePattern = new RegExp('function\\s+([^\\s(]+)[\\s(]');
 
 /**
-  * @access private
-  */
+ * @access private
+ */
 Debug.functionName = function (fn, mustBeUnique) {
   if (fn && (fn instanceof Function)) {
     // tip o' the pin to osteele.com
@@ -110,20 +109,20 @@
     }
   }
   return null;
-}
+};
 
 /**
-  * @access private
-  */
-  Debug.__String = function (thing, pretty, limit, unique) {
+ * @access private
+ */
+Debug.__String = function (thing, pretty, limit, unique) {
   try {
     switch (arguments.length) {
       case 1:
-        pretty = this.printPretty;
+      pretty = this.printPretty;
       case 2:
-        limit = this.printLength;
+      limit = this.printLength;
       case 3:
-        unique = !pretty;
+      unique = !pretty;
     }
     // Evade infinite recursion
     if (limit <= 0) return '';
@@ -170,7 +169,7 @@
         catch (e) {}
       } else if (thing['_dbg_name'] &&
                  (typeof(thing._dbg_name) == 'string'
-                 || (debug_name instanceof String))) {
+                  || (debug_name instanceof String))) {
         debug_name = thing._dbg_name;
       }
       this.printLength = opl;
@@ -290,20 +289,20 @@
         }
         var ellip = true;
         var tl = thing.length
-          // Don't accumulate beyond limit
-          for (var e = 0; (e < tl) && (s.length < limit); e++) {
-            // skip non-existent elements
-            if ((typeof(thing[e]) == 'undefined')) {
-              if (ellip) {
-                s += '..., ';
-                ellip = false;
-              }
-            } else {
-              ellip = true;
-              // TODO: [2005-06-22 ptw] Use __String in case element is huge
-              s += String(thing[e]) + ', ';
+        // Don't accumulate beyond limit
+        for (var e = 0; (e < tl) && (s.length < limit); e++) {
+          // skip non-existent elements
+          if ((typeof(thing[e]) == 'undefined')) {
+            if (ellip) {
+              s += '..., ';
+              ellip = false;
             }
+          } else {
+            ellip = true;
+            // TODO: [2005-06-22 ptw] Use __String in case element is huge
+            s += String(thing[e]) + ', ';
           }
+        }
         if (s != '')
           s = s.substring(0, s.length - 2);
         s = '[' + s + ']';
@@ -394,11 +393,11 @@
   }
   r += '\u00BB'; // >>
   return r;
-}
+};
 
 /**
-  * @access private
-  */
+ * @access private
+ */
 Debug.makeObjectLink = function (rep, id, attrs) {
   var type = 'INSPECT';
   switch (arguments.length) {
@@ -417,117 +416,118 @@
     return '<a class="' + type + '" title="' + tip + '" 
href="javascript:window.parent.$modules.lz.Debug.displayObj(' + id + ')">' + 
rep +"</a>";
   }
   return rep;
-}
+};
 
 /**
-  * @access private
-  */
+ * @access private
+ */
 Debug.inspectInternal = function (obj, showInternalProperties) {
   var si = (typeof(showInternalProperties) != 
'undefined')?showInternalProperties: this.showInternalProperties;
   var hasProto = obj && obj.hasOwnProperty;
   var opl = this.printLength;
-
-  // TODO: [2003-09-12 ptw] either bind or pass as option
-  // Disable printLength for printing the name of a non-object in case
-  // it was abbreviated, otherwise set it short
-  if (! ((typeof(obj) == 'object') || (obj instanceof Object))) {
-    this.printLength = Infinity;
-  } else {
+  try {
+    // TODO: [2003-09-12 ptw] either bind or pass as option
+    // Disable printLength for printing the name of a non-object in case
+    // it was abbreviated, otherwise set it short
+    if (! ((typeof(obj) == 'object') || (obj instanceof Object))) {
+      this.printLength = Infinity;
+    } else {
+      this.printLength = this.inspect.printLength;
+    }
+    // Turn off pretty for name
+    var name = this.xmlEscape(this.__String(obj, false));
+    if (! (obj instanceof Object)) {
+      return name;
+    }
+    // Print properties with abbreviated length
     this.printLength = this.inspect.printLength;
-  }
-  // Turn off pretty for name
-  var name = this.xmlEscape(this.__String(obj, false));
-  if (! (obj instanceof Object)) {
-    return name;
-  }
-  // Print properties with abbreviated length
-  this.printLength = this.inspect.printLength;
 
-  var keys = [];
-  var arraylen = typeof(obj.length) == 'number' ? obj.length : null;
-  if (si) {
-    // print unenumerable properties of ECMA objects
-    // TODO: [2006-04-11 ptw] enumerate Global/Number/Math/Regexp
-    // object properties
-    for (var p in {callee: true, length: true, constructor: true, prototype: 
true}) {
+    var keys = [];
+    var arraylen = typeof(obj.length) == 'number' ? obj.length : null;
+    if (si) {
+      // print unenumerable properties of ECMA objects
+      // TODO: [2006-04-11 ptw] enumerate Global/Number/Math/Regexp
+      // object properties
+      for (var p in {callee: true, length: true, constructor: true, prototype: 
true}) {
+        try {
+          if (hasProto && obj.hasOwnProperty(p)) {
+            keys.push(p);
+          }
+        } catch (e) {};
+      }
+    }
+    for (var key in obj) {
+      // Print only local slots
       try {
-        if (hasProto && obj.hasOwnProperty(p)) {
-          keys.push(p);
+        if ((! hasProto) ||
+            obj.hasOwnProperty(key) ||
+            // or getter slots (this is a heuristic -- there is no way to
+            // ask if a property is a getter)
+            (function () { try { return obj[key] } catch (e) {} })() !== 
+            (function () { try { return obj.constructor.prototype[key] } catch 
(e) {} })()
+            ) {
+          // Print array slots later, in order
+          if (arraylen && (key >= 0) && (key < arraylen)) {
+          } else if (si ||
+                     ((! this.internalProperty(key)) &&
+                      // Only show slots with internal type if showing
+                      // internals
+                      (! this.internalProperty(this.__typeof(obj[key]))))) {
+            keys.push(key);
+          }
         }
       } catch (e) {};
     }
-  }
-  for (var key in obj) {
-    // Print only local slots
-    try {
-      if ((! hasProto) ||
-          obj.hasOwnProperty(key) ||
-          // or getter slots (this is a heuristic -- there is no way to
-          // ask if a property is a getter)
-          (function () { try { return obj[key] } catch (e) {} })() !== 
-          (function () { try { return obj.constructor.prototype[key] } catch 
(e) {} })()
-          ) {
-        // Print array slots later, in order
-        if (arraylen && (key >= 0) && (key < arraylen)) {
-        } else if (si ||
-                   ((! this.internalProperty(key)) &&
-                    // Only show slots with internal type if showing
-                    // internals
-                    (! this.internalProperty(this.__typeof(obj[key]))))) {
-          keys.push(key);
-        }
+
+    keys.sort(function (a, b) {
+        var al = a.toLowerCase();
+        var bl = b.toLowerCase();
+        return (al > bl) - (al < bl);
+      });
+    var description = "";
+    var kl = keys.length;
+    var val;
+    var wid = 0;
+    // Align all keys if annotating 'weight'
+    if (this.markGeneration > 0) {
+      for (var i = 0; i < kl; i++) {
+        var kil = keys[i].length;
+        if (kil > wid) { wid = kil; }
       }
-    } catch (e) {};
-  }
-
-  keys.sort(function (a, b) {
-    var al = a.toLowerCase();
-    var bl = b.toLowerCase();
-    return (al > bl) - (al < bl);
-  });
-  var description = "";
-  var kl = keys.length;
-  var val;
-  var wid = 0;
-  // Align all keys if annotating 'weight'
-  if (this.markGeneration > 0) {
-    for (var i = 0; i < kl; i++) {
-      var kil = keys[i].length;
+    }
+    if (arraylen) {
+      var kil = ('' + arraylen).length;
       if (kil > wid) { wid = kil; }
     }
-  }
-  if (arraylen) {
-    var kil = ('' + arraylen).length;
-    if (kil > wid) { wid = kil; }
-  }
-  var last;
-  for (var i = 0; i < kl; i++) {
-    var key = keys[i];
-    // Some runtimes duplicate inherited slots
-    if (key != last) {
-      last = key;
-      val = obj[key];
-      description += '  ' + this.computeSlotDescription(obj, key, val, wid) + 
'\n';
+    var last;
+    for (var i = 0; i < kl; i++) {
+      var key = keys[i];
+      // Some runtimes duplicate inherited slots
+      if (key != last) {
+        last = key;
+        val = obj[key];
+        description += '  ' + this.computeSlotDescription(obj, key, val, wid) 
+ '\n';
+      }
     }
-  }
 
-  if (arraylen &&
-      // Don't print the characters of a string
-      (! ((typeof obj == 'string') || (obj instanceof String)))) {
-    for (var key = 0; key < arraylen; key++) {
-      // Skip non-existent elements, but don't bother with ellipses,
-      // since we are displaying the key here
-      if ((! hasProto) ||
-          obj.hasOwnProperty(key)) {
-        val = obj[key];
-        if(typeof(val) != 'undefined') {
-          description += '  ' + this.computeSlotDescription(obj, key, val, 
wid) + '\n';
+    if (arraylen &&
+        // Don't print the characters of a string
+        (! ((typeof obj == 'string') || (obj instanceof String)))) {
+      for (var key = 0; key < arraylen; key++) {
+        // Skip non-existent elements, but don't bother with ellipses,
+        // since we are displaying the key here
+        if ((! hasProto) ||
+            obj.hasOwnProperty(key)) {
+          val = obj[key];
+          if(typeof(val) != 'undefined') {
+            description += '  ' + this.computeSlotDescription(obj, key, val, 
wid) + '\n';
+          }
         }
       }
     }
+  } finally {
+    this.printLength = opl;
   }
-
-  this.printLength = opl;
   // Annotate 'weight' if available
   if (this.markGeneration > 0) {
     var leaked = this.annotation.leaked;
@@ -542,12 +542,12 @@
   }
   if (description != "") { description = ' {\n' + description + '}'; }
   return name + description;
-}
+};
 
 /**
-  * Compute slot description
-  * @access private
-  */
+ * Compute slot description
+ * @access private
+ */
 Debug.computeSlotDescription = function (obj, key, val, wid) {
   var r = key + ':';
   try {
@@ -586,7 +586,7 @@
     }
   }
   return r;
-}
+};
 
 //* A_LZ_COPYRIGHT_BEGIN ******************************************************
 //* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.            *

Modified: 
openlaszlo/branches/4.0/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java
===================================================================
--- 
openlaszlo/branches/4.0/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java
  2007-07-05 21:34:21 UTC (rev 5597)
+++ 
openlaszlo/branches/4.0/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java
  2007-07-05 21:52:20 UTC (rev 5598)
@@ -222,7 +222,6 @@
     
     protected void setDimension(Map attrs, String name, int value) {
         String strval = (String) attrs.get(name);
-        System.err.println(name + ": '" + strval +"' percentage: " + 
isPercentageDimension(strval) + " default: " + value);
         if (strval != null && isPercentageDimension(strval))
             attrs.put(name, ScriptCompiler.quote(strval));
         else

Modified: openlaszlo/branches/4.0/build-tools/runlztest.sh
===================================================================
--- openlaszlo/branches/4.0/build-tools/runlztest.sh    2007-07-05 21:34:21 UTC 
(rev 5597)
+++ openlaszlo/branches/4.0/build-tools/runlztest.sh    2007-07-05 21:52:20 UTC 
(rev 5598)
@@ -11,6 +11,7 @@
 if [ "${tags}" = "" ]; then
     tags=ANY
 fi
+errored=0
 
 # If we can't find java, look in some other likely places for it
 JAVA_EXEC=`which java`
@@ -31,8 +32,6 @@
 # write several tests into that file
 for i in $paths; do
 
-    echo "testing $i .............." 
-    
     if [ ! -f $i ]; then
         echo "Test file does not exist: $i"
         echo "Please edit the list of tests, which is $tests. "
@@ -43,15 +42,14 @@
     if [ $tags != "ANY" ]; then
     # replace commas by \| for regexp 
     tagpat=`echo $tags | sed 's/,/\\\|/g'`
-    echo "checking $i for coverage of tags ${tagpat}..."
-    sleep 1
-    # search for the tags regexp in the test file source
-    echo grep ".*covers-tags.*\(${tagpat}\)" $i
-    sleep 1
+    # echo "checking $i for coverage of tags ${tagpat}..."
+    # search for the tags regexp in the test file source   
     grep ".*covers-tags.*\(${tagpat}\)" $i
     if [ $? != 0 ]; then
         echo "skipping ${i}, does not match tags ${tagpat}"
         continue
+    else 
+        echo "testing ${i}..........."
     fi
     fi
 
@@ -70,7 +68,8 @@
     # If the compile failed, the tests should fail.
     if [ $? != 0 ] ; then
         echo "FAILED to compile test $i in runlztest.sh"
-        exit 1;
+        errored="$errored,$i"
+        echo "errored is $errored"
     fi
     
     # make the file with all the tests load in that compiled file
@@ -85,10 +84,16 @@
     
     # Stop testing if we failed a test
     if [ $? != 0 ] ; then
-        echo "FAILED a test in runlztest.sh";
-        exit 1;
+        echo "FAILED a test in runlztest.sh: $i";
+        errored="$errored,$i"
+        echo "ERRORS in tests: $errored"
     fi
     
 done
 
-echo "Done."
+if [ $errored != 0 ]; then 
+    echo "ERRORS in tests $errored"
+    exit 1
+fi
+
+echo "no errors. done."

Modified: openlaszlo/branches/4.0/test/smoke/data.lzl
===================================================================
--- openlaszlo/branches/4.0/test/smoke/data.lzl 2007-07-05 21:34:21 UTC (rev 
5597)
+++ openlaszlo/branches/4.0/test/smoke/data.lzl 2007-07-05 21:52:20 UTC (rev 
5598)
@@ -1,6 +1,6 @@
 <library>  
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 
@@ -20,11 +20,11 @@
     <view name="lor" datapath="http2:/root/child"/>
 
     <method name="testEmpty">
-      Debug.write("expect:  couldn't find dataset for http:/root");
+      Debug.info("expect:  couldn't find dataset for http:/root (error will 
print at beginning of debugger output)");
       assertEquals(0,0,0);
     </method>
     <method name="testEmpty2">
-      Debug.write("expect:  couldn't find dataset for http2:/root/child");
+      Debug.info("expect:  couldn't find dataset for http2:/root/child (error 
will print at beginning of debugger output)");
       assertEquals(0,0,0);
     </method>
   </class>

Modified: openlaszlo/branches/4.0/test/smoke/lzunit-test.lzl
===================================================================
--- openlaszlo/branches/4.0/test/smoke/lzunit-test.lzl  2007-07-05 21:34:21 UTC 
(rev 5597)
+++ openlaszlo/branches/4.0/test/smoke/lzunit-test.lzl  2007-07-05 21:52:20 UTC 
(rev 5598)
@@ -10,51 +10,7 @@
   wrong error is signalled).
 -->
 <library>
-  <!--
-    Test cases that depend on ActionScript semantics
-  -->
-  <class name="ActionScriptSemantics" extends="TestCase" 
semantics="'actionscript'">
-    <method name="setUp">
-      this.foo = {zot: "qux"};
-      this.nullvar = null;
-    </method>
 
-    <method name="tearDown">
-      delete this.foo;
-      delete this.nullvar;
-    </method>
-
-    <method name="testActionScriptSemantics">
-    <![CDATA[
-         // coercion of strings to booleans is fudged for Flash 4
-         // compatibility
-         if (canvas.runtime.indexOf("swf") == 0 && canvas.runtime < "swf7") {
-           assertFalse("non-empty", "'non-empty' is false");
-           assertFalse('0', "'0' is false");
-
-           // As is coercion of undefined to a string or number
-           assertEquals(String(undefined), '',
-                        "String(undefined) == ''");
-           assertEquals(Number(undefined), 0,
-                        "Number(undefined) == 0");
-           // Why do I need the explicit String coercion? 
-           assertEquals("foo", "" + {toString: function() {return "foo"}},
-                        "coercion to string");
-           // Henry's checks
-           assertSame(true, undefined < 1, "undefined < 1");
-           assertSame(true, undefined > -1, "undefined > -1");
-           assertEquals(0, Math.min(undefined, 1), "Math.min(undefined, 1) == 
0");
-           assertEquals(-1, Math.min(undefined, -1), "Math.min(undefined, -1) 
== -1");
-           assertEquals(1, Math.max(undefined, 1), "Math.max(undefined, 1) == 
1");
-           assertEquals(0, Math.max(undefined, -1), "Math.max(undefined, -1) 
== 0");
-         }
-         else {
-           Debug.write('ActionScriptSemantics: 11 tests skipped for runtime 
%s', canvas.runtime);
-         }
-    ]]>
-    </method>
-  </class>
-
   <!--
     Test cases that depend on JavaScript semantics
   -->
@@ -256,7 +212,7 @@
       assertFalse(0, "0 is false");
       assertFalse('', "'' is false");
       assertFalse(undefined, "undefined is false");
-      assertFalse(0/0, "NaN is false");
+      assertFalse(NaN, "NaN is false");
 
       assertEquals(null, undefined, "null == undefined");
       assertEquals('foo', 'foo', "'foo' == 'foo'");
@@ -388,16 +344,17 @@
     <!-- Override fail for testing purposes -->
     <method name="fail" args="message">
       <![CDATA[
-        dw("IntentionalFailures.fail(", message, ")");
         if (typeof(expectedFailure) == "null") {
             return super.fail(message);
         } else if (typeof(expectedFailure) == "function") {
             if (expectedFailure(message)) {
                 expectedFailures++;
+                Debug.info("Testing test system: '%0.24s' (above) is expected 
as part of this test", message);
                 return;
             }
         } else if (expectedFailure == message) {
             expectedFailures++;
+            Debug.info("Testing test system: '%0.24s' (above) is expected as 
part of this test", message);
             return;
         }
         super.fail(format("Wrong failure", expectedFailure,
@@ -418,6 +375,7 @@
 
     <method name="testFailure">
       expectedFailure = "This is an intentional failure"
+      Debug.debug("Testing test system: '%0.24s' will NOT be output as an 
error (even though you will get a message saying it is expected)", 
expectedFailure);
       fail(expectedFailure);
       assertEquals(expectedFailures, 1, "Total number of expected failures");
     </method>
@@ -443,7 +401,7 @@
       assertTrue(0, "Expected");
       assertTrue('', "Expected");
       assertTrue(undefined, "Expected");
-      assertTrue(0/0, "Expected");
+      assertTrue(NaN, "Expected");
       expectedFailure = null;
       assertEquals(12, expectedFailures, "Total number of expected failures");
       expectedFailure = ef;
@@ -563,13 +521,13 @@
             return super.error(message);
         } else if (typeof(expectedError) == "function") {
             if (expectedError(message)) {
-                Debug.write("Expected error: " + message);
                 expectedErrors++;
+                Debug.info("Testing error system: '%0.24s' (above) is expected 
as part of this test", message);
                 return;
             }
         } else if (expectedError == message) {
-            Debug.write("Expected error: " + message);
             expectedErrors++;
+            Debug.info("Testing error system: '%0.24s' (above) is expected as 
part of this test", message);
             return;
         }
         super.error(format("Wrong error", expectedError,
@@ -591,6 +549,7 @@
 
     <method name="testError">
       expectedError = "This is an intentional error";
+      Debug.debug("Testing error system: '%0.24s' will NOT be output as an 
error (even though you will get a message saying it is expected)", 
expectedError);
       error(expectedError);
       assertEquals(1, expectedErrors, "Total number of expected errors");
     </method>
@@ -605,18 +564,19 @@
       }
 
       expectedError.expectedMatch = "testing";
-      error("testing: 1, 2, 3");
+      var msg = "testing: 1, 2, 3";
+      Debug.debug("Testing error system: '%0.24s' will NOT be output as an 
error (even though you will get a message saying it is expected)", msg);
+      error(msg);
       assertEquals(1, expectedErrors, "Total number of expected errors");
 
       expectedError.expectedMatch = "This is a";
-      $reportSourceWarning(0, 0, "This is a test");
+      $reportSourceWarning(0, 0, "This is a test", true);
       assertEquals(2, expectedErrors, "Total number of expected errors");
 
-      // These tests only work if debugging is enabled
-      if (Debug) {
-
-          /* *** the code below is commented out because these are hard errors 
in DHTML JS ***
-
+      // Only test errors that are caught by the debug compiler for each 
runtime
+      if ($dhtml) {
+        // There are none for the dhtml compiler at present
+      } else {
         expectedError.expectedMatch = "flooglesnort";
         // TODO: [2002-11-16 ptw] below currently signals two errors
         undefined.flooglesnort;
@@ -652,16 +612,13 @@
         expectedError.expectedMatch = "undefined property";
         nonFunction[undefined] = 'this is an error';
         assertEquals(12, expectedErrors, "Total number of expected errors");
-          */
       }
-
-
       ]]>
     </method>
   </class>
 </library>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 

Modified: openlaszlo/branches/4.0/test/smoke/simple.lzx
===================================================================
--- openlaszlo/branches/4.0/test/smoke/simple.lzx       2007-07-05 21:34:21 UTC 
(rev 5597)
+++ openlaszlo/branches/4.0/test/smoke/simple.lzx       2007-07-05 21:52:20 UTC 
(rev 5598)
@@ -10,15 +10,17 @@
     <!-- LZUnit Tests: verify it is working first -->
     <Tautologies /> 
     <JavaScriptSemantics />
-    <ActionScriptSemantics />
+    
     <IntentionalFailures />
+    
     <IntentionalErrors />
+
     <!-- end of LZUnit Tests -->
     <TestDebugger />
   </TestSuite>
 
 </canvas>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->

Modified: openlaszlo/branches/4.0/test/smoke/smokecheck.lzx
===================================================================
--- openlaszlo/branches/4.0/test/smoke/smokecheck.lzx   2007-07-05 21:34:21 UTC 
(rev 5597)
+++ openlaszlo/branches/4.0/test/smoke/smokecheck.lzx   2007-07-05 21:52:20 UTC 
(rev 5598)
@@ -27,7 +27,6 @@
     <!-- LZUnit Tests: verify it is working first -->
     <Tautologies /> 
     <JavaScriptSemantics />
-    <ActionScriptSemantics />
     <IntentionalFailures />
     <IntentionalErrors />
     <!-- end of LZUnit Tests -->


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to