From 97f403a9d9b201d079c487bd81fe56306948936e Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 7 Jan 2006 05:15:16 +0100 Subject: [PATCH] Add a test file for checking detection of errors by the SGML parser --- src/dom/test/test-sgml-parser-error | 166 ++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100755 src/dom/test/test-sgml-parser-error 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 <