Skip to content
Browse files

add test cases with Japanese half-width voiced sounds marks and ideog…

…raphic iteration mark.
  • Loading branch information...
1 parent 0361d8c commit 3deb3d898c4bdf2f3ebc19f78349ee9813269751 @keitaf committed Jul 12, 2011
Showing with 16 additions and 0 deletions.
  1. +8 −0 autolink.yml
  2. +8 −0 extract.yml
View
8 autolink.yml
@@ -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> 漢字"
@@ -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"
View
8 extract.yml
@@ -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: ["日本語ハッシュタグ"]
@@ -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"

0 comments on commit 3deb3d8

Please sign in to comment.
Something went wrong with that request. Please try again.