diff --git a/src/dom/test/test-sgml-parser-error b/src/dom/test/test-sgml-parser-error new file mode 100755 index 000000000..fe83da3ea --- /dev/null +++ b/src/dom/test/test-sgml-parser-error @@ -0,0 +1,166 @@ +#!/bin/sh +# +# Copyright (c) 2005 Jonas Fonseca +# + +test_description='Test SGML parser error reporting + +This test checks that the SGML parser will report errors in the source +given to it. +' + +. "$TEST_LIB" + +test_output_error () { + desc="$1"; shift + src="$1"; shift + out="$1"; shift + + sgml-parser --src "$src" --error > output + echo "$out" | sed -n '2,$p' > expected + + test_expect_success "$desc" 'cmp output expected' +} + + +################################################################ +# Check parsing errors + +test_output_error \ +'Check an element error.' \ +'/dev/null <