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

Commit

Permalink
add test cases for counting tweet length
Browse files Browse the repository at this point in the history
  • Loading branch information
keita committed May 4, 2012
1 parent a653afa commit 21884bf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,24 @@ tests:
- description: "Valid url without protocol: domain + path + query"
text: "example.com/path/to/resource?search=foo&lang=en"
expected: true

lengths:
- description: "Count the number of characters"
text: "This is a test."
expected: 15

- description: "Count a URL starting with http:// as 20 characters"
text: "http://test.com"
expected: 20

- description: "Count a URL starting with https:// as 21 characters"
text: "https://test.com"
expected: 21

- description: "Count a URL without protocol as 20 characters"
text: "test.com"
expected: 20

- description: "Count multiple URLs correctly"
text: "Test http://test.com test http://test.com test.com test"
expected: 77

0 comments on commit 21884bf

Please sign in to comment.