Browse Source

Add some tests for tag edge cases.

tags/v0.3
Ben Kurtovic 10 years ago
parent
commit
c204cf489f
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      tests/tokenizer/tags.mwtest

+ 21
- 0
tests/tokenizer/tags.mwtest View File

@@ -355,6 +355,20 @@ output: [Text(text="junk <ref>bar</span>")]

---

name: incomplete_unclosed_close
label: incomplete tags: an unclosed close tag
input: "junk </"
output: [Text(text="junk </")]

---

name: incomplete_unclosed_close_text
label: incomplete tags: an unclosed close tag, with text
input: "junk </br"
output: [Text(text="junk </br")]

---

name: incomplete_close
label: incomplete tags: a close tag
input: "junk </ref>"
@@ -551,6 +565,13 @@ output: [Text(text="foo"), TagOpenOpen(invalid=True), Text(text="br"), TagCloseS

---

name: single_only_close_attribute
label: a tag that can only be single; presented as a close tag with an attribute
input: "</br id="break">"
output: [TagOpenOpen(invalid=True), Text(text="br"), TagAttrStart(pad_first=" ", pad_after_eq="", pad_before_eq=""), Text(text="id"), TagAttrEquals(), TagAttrQuote(), Text(text="break"), TagCloseSelfclose(padding="", implicit=True)]

---

name: capitalization
label: caps should be ignored within tag names
input: "<NoWiKi>{{test}}</nOwIkI>"


Loading…
Cancel
Save