diff --git a/exercises/practice/list-ops/.meta/tests.toml b/exercises/practice/list-ops/.meta/tests.toml index b83bde1..08b1edc 100644 --- a/exercises/practice/list-ops/.meta/tests.toml +++ b/exercises/practice/list-ops/.meta/tests.toml @@ -15,6 +15,9 @@ description = "append entries to a list and return the new list -> empty lists" [2c894696-b609-4569-b149-8672134d340a] description = "append entries to a list and return the new list -> list to empty list" +[e842efed-3bf6-4295-b371-4d67a4fdf19c] +description = "append entries to a list and return the new list -> empty list to list" + [71dcf5eb-73ae-4a0e-b744-a52ee387922f] description = "append entries to a list and return the new list -> non-empty lists" diff --git a/exercises/practice/list-ops/list-ops_spec.lua b/exercises/practice/list-ops/list-ops_spec.lua index 53ae283..dbcd9f5 100644 --- a/exercises/practice/list-ops/list-ops_spec.lua +++ b/exercises/practice/list-ops/list-ops_spec.lua @@ -14,6 +14,12 @@ describe('list-ops', function() assert.are.same(expected, actual) end) + it('empty list to list', function() + local expected = { 1, 2, 3, 4 } + local actual = list_ops.append({ 1, 2, 3, 4 }, {}) + assert.are.same(expected, actual) + end) + it('non-empty lists', function() local expected = { 1, 2, 2, 3, 4, 5 } local actual = list_ops.append({ 1, 2 }, { 2, 3, 4, 5 })