diff options
| author | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2021-01-20 12:42:56 -0800 |
|---|---|---|
| committer | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2021-01-20 13:21:03 -0800 |
| commit | d803b8295cb052657601c0f90392afac7b5fde47 (patch) | |
| tree | b69271d7765acf83b75d774a3b1a50da0a65ca51 /challenge-096/tyler-wardhaugh/lua/test.lua | |
| parent | e788f447e46760cc68c99a605e1d0b0820184304 (diff) | |
| download | perlweeklychallenge-club-d803b8295cb052657601c0f90392afac7b5fde47.tar.gz perlweeklychallenge-club-d803b8295cb052657601c0f90392afac7b5fde47.tar.bz2 perlweeklychallenge-club-d803b8295cb052657601c0f90392afac7b5fde47.zip | |
Ch96 (Lua): Tasks 1 & 2
Diffstat (limited to 'challenge-096/tyler-wardhaugh/lua/test.lua')
| -rwxr-xr-x | challenge-096/tyler-wardhaugh/lua/test.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/challenge-096/tyler-wardhaugh/lua/test.lua b/challenge-096/tyler-wardhaugh/lua/test.lua new file mode 100755 index 0000000000..f2071e44f2 --- /dev/null +++ b/challenge-096/tyler-wardhaugh/lua/test.lua @@ -0,0 +1,21 @@ +#!/usr/bin/env lua + +require 'busted.runner'() + +describe("Task 1, Reverse Words", function() + local t1 = require'ch-1' + it("produces correct results for the examples", function() + assert.are.same("Challenge Weekly The", t1.reverse_words("The Weekly Challenge")) + assert.are.same("family same the of part are Raku and Perl", + t1.reverse_words(" Perl and Raku are part of the same family ")) + end) +end) + + +describe("Task 2, Edit Distance", function() + local t2 = require'ch-2' + it("produces correct results for the examples", function() + assert.are.same(3, t2.edit_distance("kitten", "sitting")) + assert.are.same(2, t2.edit_distance("sunday", "monday")) + end) +end) |
