[bug in dwim-join
henrik.hjelte@poboxes.com**20051218171724] {
hunk ./js.lisp 122
-		  &key start end
-		       join-before join-after
-		  white-space (separator " ")
+		  &key (start "")
+                       end
+		       (join-before "")
+                       join-after
+		       (white-space (make-string (length start) :initial-element #\Space))
+                       (separator " ")
hunk ./js.lisp 133
-    (unless start
-      (setf start ""))
-
-    (unless join-before
-      (setf join-before ""))
-
hunk ./js.lisp 138
+          (is-first t nil)
hunk ./js.lisp 140
-	  (white-space (or white-space (make-string (length start) :initial-element #\Space)))
hunk ./js.lisp 151
-
hunk ./js.lisp 172
-				   (if cur-empty "" (concatenate 'string separator join-before))
+				   (if (or is-first (and cur-empty (string= join-before "")))
+                                        "" (concatenate 'string separator join-before))
hunk ./js.lisp 189
-						 cur-elt (if (null res)
-							     "" join-before)
+						 cur-elt
+                                                 (if (null res)
+						     "" join-before)
hunk ./js.lisp 194
-					    (cdr string-list)))) res))
+					    (cdr string-list))))
+                             res))
hunk ./js.lisp 481
-    (dwim-join value-string-lists max-length :join-before op-string)))
+    (dwim-join value-string-lists max-length :join-before op-string)    
+    ))
hunk ./ref2test.lisp 99
-        (format out-stream "~%(run! 'ref-tests)~%")))))
+        (format out-stream "~%(run-tests)~%")))))
hunk ./reference-tests.lisp 464
-(run! 'ref-tests)
+(run-tests)
hunk ./test.lisp 2
+
hunk ./test.lisp 31
-  (run! 'ref-tests))
+  (format t "Running reference tests:~&")
+  (run! 'ref-tests)
+  (format t "Running other tests:~&")
+  (run! 'ps-tests))
+
+;;---------------------------------------------------------------------------
+(def-suite ps-tests)
+(in-suite ps-tests)
+
+;; A problem with long nested operator, when the statement spanned several rows
+;; the rows would not be joined together correctly.
+(test-ps-js bug-dwim-join
+   (alert (html ((:div :id 777
+                       :style (css-inline :border "1pxsssssssssss"
+                                          :font-size "x-small"
+                                          :height (* 2 200)
+                                          :width (* 2 300))))))
+   "alert
+('<div id=\"777\" style=\"'
+ + ('border:1pxsssssssssss;font-size:x-small;height:' + 2 * 200 + ';width:'
+ + 2 * 300)
+ + '\"></div>')") ;";This line should start with a plus character.
}