From 76a524ddf63f55b1ef2b137906464ce78e2ed072 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 29 Dec 2005 22:26:39 +0100 Subject: [PATCH] More end - 3; pos++) + for (; pos < scanner->end - 2; pos++) if (pos[0] == '-' && pos[1] == '-' && pos[2] == '>') { length = pos - *string; pos += 3; diff --git a/src/dom/test/test-sgml-parser-basic b/src/dom/test/test-sgml-parser-basic index ae0739c7..c9ba4677 100755 --- a/src/dom/test/test-sgml-parser-basic +++ b/src/dom/test/test-sgml-parser-basic @@ -62,6 +62,20 @@ test_output_equals \ element: root #comment: Hello World! ' +test_output_equals \ +'Parse comment combinations.' \ +'' \ +' +element: root + #comment: ' \ +' +#comment: foo' + test_output_equals \ 'Parse an enclosed CDATA section.' \ '...]]>' \ @@ -135,6 +149,14 @@ proc-instruction: xml -> encoding="UTF8" #text: \n...\n proc-instruction: ecmascript -> var val=2;\n' +test_output_equals \ +'Parse XML processing instructions.' \ +'?>-' \ +' +proc-instruction: xml -> version="1.0" /> + attribute: version -> 1.0 +proc-instruction: xml -> /' + test_output_equals \ 'Parse exotic processing instructions.' \ '+?>-?>---' \