summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRupinder Singh Khokhar <rsk1coder99@gmail.com>2014-06-20 16:44:13 (GMT)
committer Rupinder Singh Khokhar <rsk1coder99@gmail.com>2014-07-09 04:34:21 (GMT)
commit7692c69e500284e9ace13b486af8d5e6f1f4a9de (patch)
tree01f470fb33335b505015b7b70d17783fe6cb8d0f
parent9448b963f93d65bd6ebb1eadf692a94abe482814 (diff)
downloadlibhubbub-7692c69e500284e9ace13b486af8d5e6f1f4a9de.tar.gz
libhubbub-7692c69e500284e9ace13b486af8d5e6f1f4a9de.tar.bz2
Handling LF after CR in bogus comment state & changing few tests to make it in accordance with the tester interface
-rw-r--r--src/tokeniser/tokeniser.c5
-rw-r--r--test/data/tokeniser2/INDEX2
-rw-r--r--test/data/tokeniser2/domjs.test11
3 files changed, 8 insertions, 10 deletions
diff --git a/src/tokeniser/tokeniser.c b/src/tokeniser/tokeniser.c
index 7a54df9..ca13366 100644
--- a/src/tokeniser/tokeniser.c
+++ b/src/tokeniser/tokeniser.c
@@ -1790,11 +1790,12 @@ hubbub_error hubbub_tokeniser_handle_bogus_comment(hubbub_tokeniser *tokeniser)
tokeniser->context.pending += len;
} else if (c == '\r') {
+ size_t next_len;
error = parserutils_inputstream_peek(
tokeniser->input,
- tokeniser->context.pending,
+ tokeniser->context.pending + len,
&cptr,
- &len);
+ &next_len);
if (error != PARSERUTILS_OK && error != PARSERUTILS_EOF) {
return hubbub_error_from_parserutils_error(error);
diff --git a/test/data/tokeniser2/INDEX b/test/data/tokeniser2/INDEX
index fe2b6e6..cedb81f 100644
--- a/test/data/tokeniser2/INDEX
+++ b/test/data/tokeniser2/INDEX
@@ -13,7 +13,7 @@ numericEntities.test html5lib numeric entities tests
unicodeChars.test html5lib unicode character tests
cdata.test CDATA section tests
regression.test Regression tests
-#domjs.test NA
+domjs.test html5lib parsing in tokeniser tests
namedEntities.test html5lib named entities tests
pendingSpecChanges.test NA
unicodeCharsProblematic.test html5lib unicode exceptions tests
diff --git a/test/data/tokeniser2/domjs.test b/test/data/tokeniser2/domjs.test
index b9e650c..afb17bc 100644
--- a/test/data/tokeniser2/domjs.test
+++ b/test/data/tokeniser2/domjs.test
@@ -12,14 +12,12 @@
},
{
"description":"NUL in RCDATA and RAWTEXT",
- "doubleEscaped":true,
"initialStates":["RCDATA state", "RAWTEXT state"],
- "input":"\\u0000",
- "output":["ParseError", ["Character", "\\uFFFD"]]
+ "input":"\u0000",
+ "output":["ParseError", ["Character", "\uFFFD"]]
},
{
"description":"leading U+FEFF must pass through",
- "doubleEscaped":true,
"input":"\\uFEFFfoo\\uFEFFbar",
"output":[["Character", "\\uFEFFfoo\\uFEFFbar"]]
},
@@ -77,9 +75,8 @@
},
{
"description":"--!NUL in comment ",
- "doubleEscaped":true,
- "input":"<!----!\\u0000-->",
- "output":["ParseError", "ParseError", ["Comment", "--!\\uFFFD"]]
+ "input":"<!----!\u0000-->",
+ "output":["ParseError", "ParseError", ["Comment", "--!\uFFFD"]]
},
{
"description":"space EOF after doctype ",