Permalink
Browse files

Add three new autolink tests for Japanese

  • Loading branch information...
1 parent c0c1114 commit 076bc66ccf4dbb32e8b4c4567c3d5e3e4946ae52 @mzsanford mzsanford committed Jul 8, 2011
Showing with 16 additions and 1 deletion.
  1. +4 −1 README.md
  2. +12 −0 autolink.yml
View
@@ -41,7 +41,10 @@ If you are creating a new twitter-text library in a different programming langua
## Changelog
- * v1.4.0 - 2011-05-18 [ Git tag v1.4.0 ]
+ * v1.4.2 - 2011-07-08 [ Git tag v1.4.2 ]
+ * [FIX] Additional Japanese hashtag autolinking tests
+
+ * v1.4.1 - 2011-05-18 [ Git tag v1.4.1 ]
* [FIX] Add support for Russian hashtags
* [FIX] Add support for Korean hashtags
* [FIX] Add support for Japanese hashtags (Katakana, Hiragana and Kanji)
View
@@ -227,6 +227,14 @@ tests:
text: "#カタカナ"
expected: "<a href=\"http://twitter.com/search?q=%23カタカナ\" title=\"#カタカナ\" class=\"tweet-url hashtag\">#カタカナ</a>"
+ - description: "Autolink a katakana hashtag with a voiced sounds mark followed by a space"
+ text: "#ハッシュタグ テスト"
+ expected: "<a href=\"http://twitter.com/search?q=%23ハッシュタグ\" title=\"#ハッシュタグ\" class=\"tweet-url hashtag\">#ハッシュタグ</a> テスト"
+
+ - description: "Autolink a katakana hashtag with a voiced sounds mark followed by numbers"
+ text: "#ハッシュタグ123"
+ expected: "<a href=\"http://twitter.com/search?q=%23ハッシュタグ123\" title=\"#ハッシュタグ123\" class=\"tweet-url hashtag\">#ハッシュタグ123</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> 漢字"
@@ -263,6 +271,10 @@ tests:
text: "#漢字"
expected: "<a href=\"http://twitter.com/search?q=%23漢字\" title=\"#漢字\" class=\"tweet-url hashtag\">#漢字</a>"
+ - description: "Autolink a kanji hashtag preceded by an ideographic comma, followed by an ideographic period"
+ text: "これは、#大丈夫。"
+ expected: "これは、<a href=\"http://twitter.com/search?q=%23大丈夫\" title=\"#大丈夫\" class=\"tweet-url hashtag\">#大丈夫</a>。"
+
- description: "Autolink a hiragana 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> ひらがな"

0 comments on commit 076bc66

Please sign in to comment.