diff options
Diffstat (limited to 'challenge-082/tyler-wardhaugh/lua/test.lua')
| -rwxr-xr-x | challenge-082/tyler-wardhaugh/lua/test.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/challenge-082/tyler-wardhaugh/lua/test.lua b/challenge-082/tyler-wardhaugh/lua/test.lua new file mode 100755 index 0000000000..20f0d33d27 --- /dev/null +++ b/challenge-082/tyler-wardhaugh/lua/test.lua @@ -0,0 +1,20 @@ +#!/usr/bin/env lua + +require 'busted.runner'() + +describe("Task 1, Common Factors", function() + local t1 = require'ch-1' + it("produces correct results for the examples", function() + assert.are.same(t1.common_factors(12, 18), {1, 2, 3, 6}) + assert.are.same(t1.common_factors(18, 23), {1}) + end) +end) + +describe("Task 2, Interleave Strings", function() + local t2 = require'ch-2' + it("produces correct results for the examples", function() + assert.are.same(t2.interleave_string("XY", "X", "XXY"), true) + assert.are.same(t2.interleave_string("XXY", "XXZ", "XXXXZY"), true) + assert.are.same(t2.interleave_string("YX", "X", "XXY"), false) + end) +end) |
