diff options
Diffstat (limited to 'tests/core/functional/string_spec.lua')
| -rw-r--r-- | tests/core/functional/string_spec.lua | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/core/functional/string_spec.lua b/tests/core/functional/string_spec.lua deleted file mode 100644 index 4f9f4722..00000000 --- a/tests/core/functional/string_spec.lua +++ /dev/null @@ -1,43 +0,0 @@ -local _ = require "mason.core.functional" - -describe("functional: string", function() - it("matches string patterns", function() - assert.is_true(_.matches("foo", "foo")) - assert.is_true(_.matches("bar", "foobarbaz")) - assert.is_true(_.matches("ba+r", "foobaaaaaaarbaz")) - - assert.is_false(_.matches("ba+r", "foobharbaz")) - assert.is_false(_.matches("bar", "foobaz")) - end) - - it("should format strings", function() - assert.equals("Hello World!", _.format("%s", "Hello World!")) - assert.equals("special manouvers", _.format("%s manouvers", "special")) - end) - - it("should split strings", function() - assert.same({ "This", "is", "a", "sentence" }, _.split("%s", "This is a sentence")) - assert.same({ "This", "is", "a", "sentence" }, _.split("|", "This|is|a|sentence")) - end) - - it("should gsub strings", function() - assert.same("predator", _.gsub("^apex%s*", "", "apex predator")) - end) - - it("should dedent strings", function() - assert.equals( - [[Lorem -Ipsum - Dolor - Sit - Amet]], - _.dedent [[ - Lorem - Ipsum - Dolor - Sit - Amet -]] - ) - end) -end) |
