Fixing minor bugs
parent
b7037bf46a
commit
490d7fed0b
|
@ -3,7 +3,9 @@ namespaces tools.test xml.writer sbufs sequences html.private ;
|
||||||
IN: html.tests
|
IN: html.tests
|
||||||
|
|
||||||
: make-html-string
|
: make-html-string
|
||||||
[ with-html-stream ] with-string-writer ;
|
[ with-html-stream ] with-string-writer ; inline
|
||||||
|
|
||||||
|
[ [ ] make-html-string ] must-infer
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
512 <sbuf> <html-stream> drop
|
512 <sbuf> <html-stream> drop
|
||||||
|
|
|
@ -194,7 +194,7 @@ M: html-stream stream-nl ( stream -- )
|
||||||
|
|
||||||
! Utilities
|
! Utilities
|
||||||
: with-html-stream ( quot -- )
|
: with-html-stream ( quot -- )
|
||||||
stdio get <html-stream> swap with-stream* ;
|
stdio get <html-stream> swap with-stream* ; inline
|
||||||
|
|
||||||
: xhtml-preamble
|
: xhtml-preamble
|
||||||
"<?xml version=\"1.0\"?>" write-html
|
"<?xml version=\"1.0\"?>" write-html
|
||||||
|
|
|
@ -246,7 +246,7 @@ SYMBOL: deserialized
|
||||||
(deserialize) <wrapper> ;
|
(deserialize) <wrapper> ;
|
||||||
|
|
||||||
:: (deserialize-seq) ( exemplar quot -- seq )
|
:: (deserialize-seq) ( exemplar quot -- seq )
|
||||||
deserialize-cell exemplar new
|
deserialize-cell exemplar new-sequence
|
||||||
[ intern-object ]
|
[ intern-object ]
|
||||||
[ dup [ drop quot call ] change-each ] bi ; inline
|
[ dup [ drop quot call ] change-each ] bi ; inline
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ SYMBOL: prolog-data
|
||||||
#! advance spot to after the substring.
|
#! advance spot to after the substring.
|
||||||
[ [
|
[ [
|
||||||
dup slip swap dup [ get-char , ] unless
|
dup slip swap dup [ get-char , ] unless
|
||||||
] skip-until ] "" make nip ;
|
] skip-until ] "" make nip ; inline
|
||||||
|
|
||||||
: rest ( -- string )
|
: rest ( -- string )
|
||||||
[ f ] take-until ;
|
[ f ] take-until ;
|
||||||
|
|
|
@ -6,6 +6,8 @@ USING: kernel xml tools.test io namespaces sequences xml.errors xml.entities
|
||||||
continuations assocs sequences.deep ;
|
continuations assocs sequences.deep ;
|
||||||
|
|
||||||
! This is insufficient
|
! This is insufficient
|
||||||
|
\ read-xml must-infer
|
||||||
|
|
||||||
SYMBOL: xml-file
|
SYMBOL: xml-file
|
||||||
[ ] [ "extra/xml/tests/test.xml" resource-path
|
[ ] [ "extra/xml/tests/test.xml" resource-path
|
||||||
[ file>xml ] with-html-entities xml-file set ] unit-test
|
[ file>xml ] with-html-entities xml-file set ] unit-test
|
||||||
|
|
Loading…
Reference in New Issue