From d4d7ef9c047fb867b4163c6a2709f1654d8c6d42 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 4 Jan 2018 22:33:55 -0500 Subject: [PATCH] failing tests for #1066 --- test/parser/samples/html-entities/input.html | 1 + test/parser/samples/html-entities/output.json | 42 +++++++++++++++++++ .../html-entities-inside-elements/_config.js | 5 +++ .../html-entities-inside-elements/main.html | 1 + 4 files changed, 49 insertions(+) create mode 100644 test/parser/samples/html-entities/input.html create mode 100644 test/parser/samples/html-entities/output.json create mode 100644 test/runtime/samples/html-entities-inside-elements/_config.js create mode 100644 test/runtime/samples/html-entities-inside-elements/main.html diff --git a/test/parser/samples/html-entities/input.html b/test/parser/samples/html-entities/input.html new file mode 100644 index 0000000000..69aa63b174 --- /dev/null +++ b/test/parser/samples/html-entities/input.html @@ -0,0 +1 @@ +

this <em>should</em> not be <strong>bold</strong>

\ No newline at end of file diff --git a/test/parser/samples/html-entities/output.json b/test/parser/samples/html-entities/output.json new file mode 100644 index 0000000000..1bfda7ae26 --- /dev/null +++ b/test/parser/samples/html-entities/output.json @@ -0,0 +1,42 @@ +{ + "hash": 488075009, + "html": { + "start": 0, + "end": 93, + "type": "Fragment", + "children": [ + { + "start": 0, + "end": 93, + "type": "Element", + "name": "p", + "attributes": [], + "children": [ + { + "start": 3, + "end": 43, + "type": "Text", + "data": "this <em>should</em> not be " + }, + { + "start": 43, + "end": 89, + "type": "Element", + "name": "span", + "attributes": [], + "children": [ + { + "start": 49, + "end": 82, + "type": "Text", + "data": "<strong>bold</strong>" + } + ] + } + ] + } + ] + }, + "css": null, + "js": null +} \ No newline at end of file diff --git a/test/runtime/samples/html-entities-inside-elements/_config.js b/test/runtime/samples/html-entities-inside-elements/_config.js new file mode 100644 index 0000000000..a53af0a297 --- /dev/null +++ b/test/runtime/samples/html-entities-inside-elements/_config.js @@ -0,0 +1,5 @@ +export default { + html: ` +

this <em>should</em> not be <strong>bold</strong>

+ ` +}; \ No newline at end of file diff --git a/test/runtime/samples/html-entities-inside-elements/main.html b/test/runtime/samples/html-entities-inside-elements/main.html new file mode 100644 index 0000000000..69aa63b174 --- /dev/null +++ b/test/runtime/samples/html-entities-inside-elements/main.html @@ -0,0 +1 @@ +

this <em>should</em> not be <strong>bold</strong>

\ No newline at end of file