Skip to content

Commit

Permalink
add test cases with Japanese half-width voiced sounds marks and ideog…
Browse files Browse the repository at this point in the history
…raphic iteration mark.
  • Loading branch information
keita committed Jul 13, 2011
1 parent 0361d8c commit 3deb3d8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions autolink.yml
Expand Up @@ -235,6 +235,10 @@ tests:
text: "#ハッシュタグ123"
expected: "<a href=\"http://twitter.com/search?q=%23ハッシュタグ123\" title=\"#ハッシュタグ123\" class=\"tweet-url hashtag\">#ハッシュタグ123</a>"

- description: "Autolink a katakana hashtag with another voiced sounds mark"
text: "#パピプペポ"
expected: "<a href=\"http://twitter.com/search?q=%23パピプペポ\" title=\"#パピプペポ\" class=\"tweet-url hashtag\">#パピプペポ</a>"

- description: "Autolink a kanji hashtag preceded by a space and followed by a space"
text: "漢字 #漢字 漢字"
expected: "漢字 <a href=\"http://twitter.com/search?q=%23漢字\" title=\"#漢字\" class=\"tweet-url hashtag\">#漢字</a> 漢字"
Expand Down Expand Up @@ -344,6 +348,10 @@ tests:
expected: "できましたよー!<a href=\"http://twitter.com/search?q=%23日本語ハッシュタグ\" title=\"#日本語ハッシュタグ\" class=\"tweet-url hashtag\">#日本語ハッシュタグ</a>。"


- description: "Autolink a hashtag containing ideographic iteration mark"
text: "#云々"
expected: "<a href=\"http://twitter.com/search?q=%23云々\" title=\"#云々\" class=\"tweet-url hashtag\">#云々</a>"

urls:
- description: "Autolink URL with pipe character"
text: "text http://example.com/pipe|character?yes|pipe|character"
Expand Down
8 changes: 8 additions & 0 deletions extract.yml
Expand Up @@ -404,6 +404,10 @@ tests:
text: "長音ハッシュタグ。#サッカー"
expected: ["サッカー"]

- description: "Hashtag with half-widh voiced sounds marks"
text: "#ハッシュタグ #パピプペポ"
expected: ["ハッシュタグ", "パピプペポ"]

- description: "Hashtag with half-width # after full-width !"
text: "できましたよー!#日本語ハッシュタグ。"
expected: ["日本語ハッシュタグ"]
Expand All @@ -412,6 +416,10 @@ tests:
text: "できましたよー!#日本語ハッシュタグ。"
expected: ["日本語ハッシュタグ"]

- description: "Hashtag with ideographic iteration mark"
text: "#云々"
expected: ["云々"]

hashtags_with_indices:
- description: "Extract a hastag at the start"
text: "#hashtag here"
Expand Down

0 comments on commit 3deb3d8

Please sign in to comment.