Permalink
Browse files

add more cashtag tests

  • Loading branch information...
keita
keita committed Aug 1, 2012
1 parent a405a8d commit a48d2010ffc2acfd54ebddcee513525a1edfcbb9
Showing with 12 additions and 0 deletions.
  1. +4 −0 autolink.yml
  2. +8 −0 extract.yml
View
@@ -681,6 +681,10 @@ tests:
text: "Text $STOCK text $symbol text"
expected: "Text <a href=\"https://twitter.com/#!/search?q=%24STOCK\" title=\"$STOCK\" class=\"tweet-url cashtag\">$STOCK</a> text <a href=\"https://twitter.com/#!/search?q=%24symbol\" title=\"$symbol\" class=\"tweet-url cashtag\">$symbol</a> text"
+ - description: "Autolink only a cashtag in text"
+ text: "Text STOCK $STOCK text symbol $symbol text"
+ expected: "Text STOCK <a href=\"https://twitter.com/#!/search?q=%24STOCK\" title=\"$STOCK\" class=\"tweet-url cashtag\">$STOCK</a> text symbol <a href=\"https://twitter.com/#!/search?q=%24symbol\" title=\"$symbol\" class=\"tweet-url cashtag\">$symbol</a> text"
+
all:
- description: "Autolink all does not break on URL with @"
text: "http://www.flickr.com/photos/29674651@N00/4382024406 if you know what's good for you."
View
@@ -847,3 +847,11 @@ tests:
indices: [9, 16]
- cashtag: "symbol_ab"
indices: [22, 32]
+
+ - description: "Do not extract non-cashtags"
+ text: "appl $appl goog $goog"
+ expected:
+ - cashtag: "appl"
+ indices: [5, 10]
+ - cashtag: "goog"
+ indices: [16, 21]

0 comments on commit a48d201

Please sign in to comment.