]> gitweb.factorcode.org Git - factor.git/blob - basis/xmode/code2html/code2html-tests.factor
Fix another XMode bug
[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 \ htmlize-file must-infer
7
8 [ ] [ \ (load-mode) reset-memoized ] unit-test
9
10 [ ] [
11     <" <style type="text/css" media="screen" >
12     *        {margin:0; padding:0; border:0;} ">
13     string-lines "html" htmlize-lines drop
14 ] unit-test
15
16 [ ] [
17     "test.c"
18     <" int x = "hi";
19 /* a comment */ "> <string-reader> htmlize-stream
20     write-xml
21 ] unit-test
22
23 [ "<span class=\"MARKUP\">: foo</span> <span class=\"MARKUP\">;</span>" ] [
24     { ": foo ;" } "factor" htmlize-lines xml>string
25 ] unit-test
26
27 [ ":foo" ] [
28     { ":foo" } "factor" htmlize-lines xml>string
29 ] unit-test