]> gitweb.factorcode.org Git - factor.git/blob - basis/xml/errors/errors-tests.factor
Fix permission bits
[factor.git] / basis / xml / errors / errors-tests.factor
1 USING: continuations xml xml.errors tools.test kernel arrays xml.data state-parser quotations ;
2 IN: xml.errors.tests
3
4 : xml-error-test ( expected-error xml-string -- )
5     [ string>xml ] curry swap [ = ] curry must-fail-with ;
6
7 T{ no-entity f 1 10 "nbsp" } "<x>&nbsp;</x>" xml-error-test
8 T{ mismatched f 1 8 T{ name f "" "x" "" } T{ name f "" "y" "" }
9 } "<x></y>" xml-error-test
10 T{ unclosed f 1 4 V{ T{ name f "" "x" "" } } } "<x>" xml-error-test
11 T{ nonexist-ns f 1 5 "x" } "<x:y/>" xml-error-test
12 T{ unopened f 1 5 } "</x>" xml-error-test
13 T{ not-yes/no f 1 41 "maybe" } "<?xml version='1.0' standalone='maybe'?><x/>" xml-error-test
14 T{ extra-attrs f 1 32 V{ T{ name f "" "foo" f } }
15 } "<?xml version='1.1' foo='bar'?><x/>" xml-error-test
16 T{ bad-version f 1 28 "5 million" } "<?xml version='5 million'?><x/>" xml-error-test
17 T{ notags f } "" xml-error-test
18 T{ multitags } "<x/><y/>" xml-error-test
19 T{ bad-prolog  f 1 26 T{ prolog f "1.0" "UTF-8" f }
20 } "<x/><?xml version='1.0'?>" xml-error-test
21 T{ capitalized-prolog f 1 6 "XmL" } "<?XmL version='1.0'?><x/>"
22 xml-error-test
23 T{ pre/post-content f "x" t } "x<y/>" xml-error-test
24 T{ versionless-prolog f 1 8 } "<?xml?><x/>" xml-error-test
25 T{ bad-instruction f 1 11 T{ instruction f "xsl" }
26 } "<x><?xsl?></x>" xml-error-test
27 T{ bad-directive f 1 15 T{ directive f "DOCTYPE" }
28 } "<x/><!DOCTYPE>" xml-error-test