Permalink
Browse files

Add readme and sample files

  • Loading branch information...
0 parents commit 4cb08c86488d20753704e29bd9dfef6fac989137 Matt Sanford committed Jan 21, 2010
Showing with 37 additions and 0 deletions.
  1. +1 −0 README
  2. +18 −0 autolink.yml
  3. +18 −0 extract.yml
1 README
@@ -0,0 +1 @@
+Yaml files that define the conformance testing for twitter-text-* libraries.
@@ -0,0 +1,18 @@
+
+tests:
+ usernames:
+ - description: "Autolink trailing username"
+ text: "text @username"
+ expected: "text @<a class=\"tweet-url username\" href=\"http://twitter.com/username\">username</a>"
+ lists:
+ - description: "Autolink trailing list"
+ text: "text @username/list"
+ expected: "text @<a class=\"tweet-url list-slug\" href=\"http://twitter.com/username/list\">username/list</a>"
+ urls:
+ - description: "Autolink trailing url"
+ text: "text http://example.com"
+ expected: "text <a href=\"http://example.com\">http://example.com</a>"
+ hashtags:
+ - description: "Autolink trailing hashtag"
+ text: "text #hashtag"
+ expected: "text <a href=\"http://twitter.com/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>"
@@ -0,0 +1,18 @@
+
+tests:
+ mentions:
+ - description: "Extract mention at the begining of a tweet"
+ text: "@username reply"
+ expected: ["username"]
+ replies:
+ - description: "Extract reply at the begining of a tweet"
+ text: "@username reply"
+ expected: "username"
+ urls:
+ - description: "Extract a lone URL"
+ text: "http://example.com"
+ expected: ["http://example.com"]
+ hashtags:
+ - description: "Extract a lone hashtag"
+ text: "#hashtag"
+ expected: ["hashtag"]

0 comments on commit 4cb08c8

Please sign in to comment.