Merge branch 'xml-fix' of git://tiodante.com/git/factor

db4
Slava Pestov 2009-07-29 19:27:13 -05:00
commit eda66805b2
2 changed files with 5 additions and 0 deletions

View File

@ -73,3 +73,7 @@ SYMBOL: xml-file
[ T{ xml-chunk f V{ "hello" } } ] [ "hello" string>xml-chunk ] unit-test [ T{ xml-chunk f V{ "hello" } } ] [ "hello" string>xml-chunk ] unit-test
[ "1.1" ] [ "<?xml version='1.1'?><x/>" string>xml prolog>> version>> ] unit-test [ "1.1" ] [ "<?xml version='1.1'?><x/>" string>xml prolog>> version>> ] unit-test
[ "ß" ] [ "<x>ß</x>" <string-reader> read-xml children>string ] unit-test [ "ß" ] [ "<x>ß</x>" <string-reader> read-xml children>string ] unit-test
! <pull-xml> tests
! this tests just checks that pull-event doesn't raise an exception
[ ] [ "vocab:xml/tests/test.xml" binary [ <pull-xml> pull-event drop ] with-file-reader ] unit-test

View File

@ -110,6 +110,7 @@ PRIVATE>
TUPLE: pull-xml scope ; TUPLE: pull-xml scope ;
: <pull-xml> ( -- pull-xml ) : <pull-xml> ( -- pull-xml )
[ [
init-parser
input-stream [ ] change ! bring var in this scope input-stream [ ] change ! bring var in this scope
init-xml text-now? on init-xml text-now? on
] H{ } make-assoc ] H{ } make-assoc