aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit_tests
diff options
context:
space:
mode:
authorJez Ng2012-10-27 15:36:35 -0400
committerJez Ng2012-10-29 17:53:16 -0400
commitc0af54eac713be14d1e3eceeca23139455abb408 (patch)
treec6fee40a7169a6ee55721cc57594aaff71bad368 /tests/unit_tests
parent22796c1676decbda4f2785f1cb10667ebaf941c7 (diff)
downloadvimium-c0af54eac713be14d1e3eceeca23139455abb408.tar.bz2
Split out compareVersions into the Utils file.
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/utils_test.coffee8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unit_tests/utils_test.coffee b/tests/unit_tests/utils_test.coffee
index 366133ac..e1aa32c7 100644
--- a/tests/unit_tests/utils_test.coffee
+++ b/tests/unit_tests/utils_test.coffee
@@ -44,9 +44,15 @@ context "convertToUrl",
assert.equal "http://www.google.com/search?q=go%20ogle.com", Utils.convertToUrl("go ogle.com")
context "Function currying",
-
should "Curry correctly", ->
foo = (a, b) -> "#{a},#{b}"
assert.equal "1,2", foo.curry()(1,2)
assert.equal "1,2", foo.curry(1)(2)
assert.equal "1,2", foo.curry(1,2)()
+
+context "compare versions",
+ should "compare correctly", ->
+ assert.equal 0, Utils.compareVersions("1.40.1", "1.40.1")
+ assert.equal -1, Utils.compareVersions("1.40.1", "1.40.2")
+ assert.equal -1, Utils.compareVersions("1.40.1", "1.41")
+ assert.equal 1, Utils.compareVersions("1.41", "1.40")