mirror of
https://github.com/TangentFoxy/semver.lua.git
synced 2025-07-28 02:52:21 +00:00
added nextMinor, nextMajor, nextPatch
This commit is contained in:
@@ -101,4 +101,27 @@ context('semver', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("nextPatch", function()
|
||||
it("increases the patch number by 1", function()
|
||||
assert_equal(v'1.0.1', v'1.0.0':nextPatch())
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("nextMinor", function()
|
||||
it("increases the minor number by 1", function()
|
||||
assert_equal(v'1.2.0', v'1.1.0':nextMinor())
|
||||
end)
|
||||
it("resets the patch number", function()
|
||||
assert_equal(v'1.2.0', v'1.1.7':nextMinor())
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("nextMajor", function()
|
||||
it("increases the major number by 1", function()
|
||||
assert_equal(v'2.0.0', v'1.0.0':nextMajor())
|
||||
end)
|
||||
it("resets the patch number", function()
|
||||
assert_equal(v'2.0.0', v'1.2.3':nextMajor())
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user