diff options
| author | V1K1NGbg <victor@ilchev.com> | 2024-08-22 23:10:13 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 13:30:51 -0300 |
| commit | 048edb8e011ce2e7e6910e305dc9a3242d319831 (patch) | |
| tree | 76aacbd0915a80fb0bc4dacf20a40a889993343f /spec/unit/fun_spec.lua | |
| parent | 7ed4465b8177dcaa8742f079bc6b4d2745fd68c8 (diff) | |
| download | luarocks-048edb8e011ce2e7e6910e305dc9a3242d319831.tar.gz luarocks-048edb8e011ce2e7e6910e305dc9a3242d319831.tar.bz2 luarocks-048edb8e011ce2e7e6910e305dc9a3242d319831.zip | |
tests: unit test updates
Diffstat (limited to 'spec/unit/fun_spec.lua')
| -rw-r--r-- | spec/unit/fun_spec.lua | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/spec/unit/fun_spec.lua b/spec/unit/fun_spec.lua index bffb60d7..774aa937 100644 --- a/spec/unit/fun_spec.lua +++ b/spec/unit/fun_spec.lua | |||
| @@ -58,17 +58,6 @@ describe("luarocks.fun #unit", function() | |||
| 58 | end) | 58 | end) |
| 59 | end) | 59 | end) |
| 60 | 60 | ||
| 61 | describe("fun.traverse", function() | ||
| 62 | it("recursively applies a function to each element in a given table and returns the results in a new table", function() | ||
| 63 | local t | ||
| 64 | |||
| 65 | t = {1, 2, {3, 4, {5, 6}}} | ||
| 66 | assert.same(fun.traverse(t, addOne), {2, 3, {4, 5, {6, 7}}}) | ||
| 67 | t = {1, 2, {}, {1, {}, 2}} | ||
| 68 | assert.same(fun.traverse(t, addOne), {2, 3, {}, {2, {}, 3}}) | ||
| 69 | end) | ||
| 70 | end) | ||
| 71 | |||
| 72 | describe("fun.filter", function() | 61 | describe("fun.filter", function() |
| 73 | it("filters the elements in the given table and returns the result in a new table", function() | 62 | it("filters the elements in the given table and returns the result in a new table", function() |
| 74 | local t | 63 | local t |
