Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Add tests for U+015F in hashtags: #4
Browse files Browse the repository at this point in the history
  • Loading branch information
mzsanford committed Aug 5, 2011
1 parent b186e84 commit da94908
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autolink.yml
Expand Up @@ -355,6 +355,10 @@ tests:
text: "Hashtags in #中文, #日本語, #한국말, and #русский! Try it out!"
expected: "Hashtags in <a href=\"http://twitter.com/search?q=%23中文\" title=\"#中文\" class=\"tweet-url hashtag\">#中文</a>, <a href=\"http://twitter.com/search?q=%23日本語\" title=\"#日本語\" class=\"tweet-url hashtag\">#日本語</a>, <a href=\"http://twitter.com/search?q=%23한국말\" title=\"#한국말\" class=\"tweet-url hashtag\">#한국말</a>, and <a href=\"http://twitter.com/search?q=%23русский\" title=\"#русский\" class=\"tweet-url hashtag\">#русский</a>! Try it out!"

- description: "Autolink should allow for ş (U+015F) in a hashtag"
text: "Here’s a test tweet for you: #Ateş #qrşt #ştu #ş"
expected: "Here’s a test tweet for you: <a href=\"http://twitter.com/search?q=%23Ateş\" title=\"#Ateş\" class=\"tweet-url hashtag\">#Ateş</a> <a href=\"http://twitter.com/search?q=%23qrşt\" title=\"#qrşt\" class=\"tweet-url hashtag\">#qrşt</a> <a href=\"http://twitter.com/search?q=%23ştu\" title=\"#ştu\" class=\"tweet-url hashtag\">#ştu</a> <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
4 changes: 4 additions & 0 deletions extract.yml
Expand Up @@ -459,6 +459,10 @@ tests:
text: "#云々"
expected: ["云々"]

- description: "Hashtags with ş (U+015F)"
text: "Here’s a test tweet for you: #Ateş #qrşt #ştu #ş"
expected: ["Ateş", "qrşt", "ştu", "ş"]

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

0 comments on commit da94908

Please sign in to comment.