diff -r 0e571ced5bc4 -r 138e76fe73a6 unittests/tests/utils.js
--- a/unittests/tests/utils.js Thu Dec 01 14:59:08 2011 +0100
+++ b/unittests/tests/utils.js Thu Dec 01 15:43:28 2011 +0100
@@ -42,9 +42,18 @@
});
test("test function to format a tweet", function() {
- var input = "@handle @bundle #hashtag http://t.co/11111";
- var output = "@handle @bundle #hashtag http://t.co/11111";
- equal(IriSP.formatTweet(input), output, "the correct output is given");
+ var inputs = ["@handle", "@bundle", "#hashtag", "http://t.co/11111", "++", "--"];
+ var outputs = ["@handle",
+ "@bundle",
+ "#hashtag",
+ "http://t.co/11111",
+ "++",
+ "--"];
+
+ var i = 0;
+ for(i = 0; i < inputs.length; i++) {
+ equal(IriSP.formatTweet(inputs[i]), outputs[i], "the correct output is given");
+ }
});
test("test function to convert decimal color to hexadecimal", function() {