factor/basis/xmode/code2html/code2html-tests.factor

28 lines
679 B
Factor
Raw Normal View History

IN: xmode.code2html.tests
USING: xmode.code2html xmode.catalog
tools.test multiline splitting memoize
kernel io.streams.string xml.writer ;
[ ] [ \ (load-mode) reset-memoized ] unit-test
[ ] [
2009-09-20 23:42:40 -04:00
"""<style type="text/css" media="screen" >
* {margin:0; padding:0; border:0;}"""
string-lines "html" htmlize-lines drop
] unit-test
[ ] [
"test.c"
2009-09-20 23:42:40 -04:00
"""int x = "hi";
/* a comment */""" <string-reader> htmlize-stream
write-xml
] unit-test
[ "<span class=\"MARKUP\">: foo</span> <span class=\"MARKUP\">;</span>" ] [
{ ": foo ;" } "factor" htmlize-lines xml>string
2009-03-28 23:19:55 -04:00
] unit-test
[ ":foo" ] [
{ ":foo" } "factor" htmlize-lines xml>string
2009-09-20 23:42:40 -04:00
] unit-test