ソースを参照

Add some tests for tag edge cases.

tags/v0.3
Ben Kurtovic 11年前
コミット
c204cf489f
1個のファイルの変更21行の追加0行の削除
  1. +21
    -0
      tests/tokenizer/tags.mwtest

+ 21
- 0
tests/tokenizer/tags.mwtest ファイルの表示

@@ -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>"


読み込み中…
キャンセル
保存