updated the test cases to be more precise with logs
@@ -9,9 +9,18 @@ describe("Typedecl", function()
end, "tag name 'TESTTYPE.Foo.Bar' is already being used")
end)
- it("'match_tag' works as expected.", function ()
+ describe("'match_tag'", function ()
+ it("doesn't treat a '.' in the prefix string as regex", function ()
assert.falsy(typedecl.match_tag("foo.Bar.baz", "f.o.Bar"))
- assert.truthy(typedecl.match_tag("foo.Bar.baz", "foo.Bar"))
+ end)
+
+ it("works as expected with input strings", function ()
+ assert.are.equals(typedecl.match_tag("foo.Bar.baz", "foo.Bar"), "baz")
+ end)
+
+ it("doesn't require a '.' at the end of prefix.", function ()
assert.falsy(typedecl.match_tag("types.T.Float", "types.T."))
- end, "")
+ end)
+ end)
+
end)
