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