small fixes in the way the prereleases are specified and parsed

This commit is contained in:
Enrique García Cota
2012-01-15 01:37:20 +01:00
parent 84fc954877
commit 043c181c89
2 changed files with 16 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ context('semver', function()
end)
it('parses prereleases, if they exist', function()
checkVersion(v(1,2,3,"alpha"), 1,2,3,"alpha")
checkVersion(v(1,2,3,"-alpha"), 1,2,3,"alpha")
end)
end)
@@ -82,7 +82,7 @@ context('semver', function()
end)
it("works with a prerelease", function()
assert_equal("1.2.3-beta", tostring(v(1,2,3,'beta')))
assert_equal("1.2.3-beta", tostring(v(1,2,3,'-beta')))
end)
end)
@@ -117,6 +117,9 @@ context('semver', function()
test("false if major =, minor =, but patch >", function()
assert_greater_than(v'0.0.2', v'0.0.1')
end)
describe("prereleases", function()
end)
end)
describe("nextPatch", function()