]> gitweb.factorcode.org Git - factor.git/blob - basis/xmode/code2html/code2html-tests.factor
a7aaa0453007f875272ebecf226e993297be91fc
[factor.git] / basis / xmode / code2html / code2html-tests.factor
1 IN: xmode.code2html.tests
2 USING: xmode.code2html xmode.catalog
3 tools.test multiline splitting memoize
4 kernel io.streams.string xml.writer ;
5
6 { } [ \ (load-mode) reset-memoized ] unit-test
7
8 { } [
9     "<style type=\"text/css\" media=\"screen\" >
10     *        {margin:0; padding:0; border:0;}"
11     string-lines "html" htmlize-lines drop
12 ] unit-test
13
14 { } [
15     "test.c"
16     "int x = \"hi\";
17 /* a comment */" <string-reader> htmlize-stream
18     write-xml
19 ] unit-test
20
21 { "<span class=\"MARKUP\">: foo</span> <span class=\"MARKUP\">;</span>" } [
22     { ": foo ;" } "factor" htmlize-lines xml>string
23 ] unit-test
24
25 { ":foo" } [
26     { ":foo" } "factor" htmlize-lines xml>string
27 ] unit-test