]> gitweb.factorcode.org Git - factor.git/commitdiff
html.streams: describe test case should check result
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Aug 2023 18:06:21 +0000 (11:06 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Aug 2023 18:06:21 +0000 (11:06 -0700)
basis/html/streams/streams-tests.factor

index a0cd6c47a6b20fe4ec53cb9a7e869cb1779caca0..34985ce049f9e2206803dd6da3b2914b540944c9 100644 (file)
@@ -1,6 +1,6 @@
 USING: html.streams html.streams.private accessors io
-io.streams.string io.styles kernel namespaces tools.test
-sbufs sequences inspector colors xml.writer
+io.streams.string io.styles kernel multiline namespaces
+tools.test sbufs sequences inspector colors xml.writer
 classes.predicate prettyprint ;
 IN: html.streams.tests
 
@@ -61,4 +61,46 @@ M: funky url-of "http://www.funky-town.com/" swap town>> append ;
     [ H{ } [ ] with-nesting nl ] make-html-string
 ] unit-test
 
-{ } [ [ { 1 2 3 } describe ] with-html-writer drop ] unit-test
+{ [=[
+array with 3 elements
+<br/>
+<table style="display: inline-table; border-collapse: collapse;">
+  <tr>
+    <td valign="top" style="border: 1px solid #cccccc; padding: 2px; ">
+      <div style="display: inline-block; ">
+        0
+      </div>
+    </td>
+    <td valign="top" style="border: 1px solid #cccccc; padding: 2px; ">
+      <div style="display: inline-block; ">
+        1
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top" style="border: 1px solid #cccccc; padding: 2px; ">
+      <div style="display: inline-block; ">
+        1
+      </div>
+    </td>
+    <td valign="top" style="border: 1px solid #cccccc; padding: 2px; ">
+      <div style="display: inline-block; ">
+        2
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top" style="border: 1px solid #cccccc; padding: 2px; ">
+      <div style="display: inline-block; ">
+        2
+      </div>
+    </td>
+    <td valign="top" style="border: 1px solid #cccccc; padding: 2px; ">
+      <div style="display: inline-block; ">
+        3
+      </div>
+    </td>
+  </tr>
+</table>
+<br/>]=]
+} [ [ { 1 2 3 } describe ] with-html-writer pprint-xml>string ] unit-test