From ebae774b8c63d69f5b955d6bada8669b374e8dc8 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 6 May 2008 14:48:28 -0500 Subject: [PATCH] moved xml errors tests to a new place --- extra/xml/errors/errors-tests.factor | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 extra/xml/errors/errors-tests.factor diff --git a/extra/xml/errors/errors-tests.factor b/extra/xml/errors/errors-tests.factor new file mode 100755 index 0000000000..402c76dc01 --- /dev/null +++ b/extra/xml/errors/errors-tests.factor @@ -0,0 +1,28 @@ +USING: continuations xml xml.errors tools.test kernel arrays xml.data state-parser quotations ; +IN: xml.errors.tests + +: xml-error-test ( expected-error xml-string -- ) + [ string>xml ] curry swap [ = ] curry must-fail-with ; + +T{ no-entity f 1 10 "nbsp" } " " xml-error-test +T{ mismatched f 1 8 T{ name f "" "x" "" } T{ name f "" "y" "" } +} "" xml-error-test +T{ unclosed f 1 4 V{ T{ name f "" "x" "" } } } "" xml-error-test +T{ nonexist-ns f 1 5 "x" } "" xml-error-test +T{ unopened f 1 5 } "" xml-error-test +T{ not-yes/no f 1 41 "maybe" } "" xml-error-test +T{ extra-attrs f 1 32 V{ T{ name f "" "foo" f } } +} "" xml-error-test +T{ bad-version f 1 28 "5 million" } "" xml-error-test +T{ notags f 1 0 } "" xml-error-test +T{ multitags } "" xml-error-test +T{ bad-prolog f 1 26 T{ prolog f "1.0" "UTF-8" f } +} "" xml-error-test +T{ capitalized-prolog f 1 6 "XmL" } "" +xml-error-test +T{ pre/post-content f "x" t } "x" xml-error-test +T{ versionless-prolog f 1 8 } "" xml-error-test +T{ bad-instruction f 1 11 T{ instruction f "xsl" } +} "" xml-error-test +T{ bad-directive f 1 15 T{ directive f "DOCTYPE" } +} "" xml-error-test