summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2017-06-10 17:01:27 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2017-06-10 18:11:58 +0200
commit79c8a6b10593c709fd3ceea9deef35c1a3da70f0 (patch)
tree618295cd6160813f3add5ca3108a0616dfae000c /test
parentfb2f518cc61239a4010612c9307a3fd7d13c996c (diff)
downloadlibxml2-79c8a6b10593c709fd3ceea9deef35c1a3da70f0.tar.gz
Print error messages for truncated UTF-8 sequences
Before, truncated UTF-8 sequences at the end of a file were treated as EOF. Create an error message containing the offending bytes. xmlStringCurrentChar would also print characters from the input stream, not the string it's working on.
Diffstat (limited to 'test')
-rw-r--r--test/errors/partial_utf8_1.xml1
-rw-r--r--test/errors/partial_utf8_2.xml1
-rw-r--r--test/errors/partial_utf8_3.xml1
3 files changed, 3 insertions, 0 deletions
diff --git a/test/errors/partial_utf8_1.xml b/test/errors/partial_utf8_1.xml
new file mode 100644
index 00000000..f8596206
--- /dev/null
+++ b/test/errors/partial_utf8_1.xml
@@ -0,0 +1 @@
+<a>Â \ No newline at end of file
diff --git a/test/errors/partial_utf8_2.xml b/test/errors/partial_utf8_2.xml
new file mode 100644
index 00000000..dbc2d817
--- /dev/null
+++ b/test/errors/partial_utf8_2.xml
@@ -0,0 +1 @@
+<a>ã  \ No newline at end of file
diff --git a/test/errors/partial_utf8_3.xml b/test/errors/partial_utf8_3.xml
new file mode 100644
index 00000000..0abd9de8
--- /dev/null
+++ b/test/errors/partial_utf8_3.xml
@@ -0,0 +1 @@
+<a>ò   \ No newline at end of file