diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-23 17:09:35 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-23 17:09:35 +0300 |
commit | 8a5ed8d9b883c96cd48f6638bd439fc38a069e4b (patch) | |
tree | 97020c5852e83bc7f2a5119ffee9d81892238cd9 | |
parent | fe02167a92680f4b9bc2dcd9a98f61f41b76f94e (diff) | |
download | luarocks-8a5ed8d9b883c96cd48f6638bd439fc38a069e4b.tar.gz luarocks-8a5ed8d9b883c96cd48f6638bd439fc38a069e4b.tar.bz2 luarocks-8a5ed8d9b883c96cd48f6638bd439fc38a069e4b.zip |
test
-rw-r--r-- | src/luarocks/test.tl | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/luarocks/test.tl b/src/luarocks/test.tl index 6c1761f0..d076d264 100644 --- a/src/luarocks/test.tl +++ b/src/luarocks/test.tl | |||
@@ -65,7 +65,6 @@ function test.run_test_suite(rockspec_arg: string | Rockspec, test_type: string, | |||
65 | return nil, err | 65 | return nil, err |
66 | end | 66 | end |
67 | end | 67 | end |
68 | assert(test_type) --! | ||
69 | 68 | ||
70 | local all_deps = { | 69 | local all_deps = { |
71 | "dependencies", | 70 | "dependencies", |
@@ -81,17 +80,9 @@ function test.run_test_suite(rockspec_arg: string | Rockspec, test_type: string, | |||
81 | end | 80 | end |
82 | end | 81 | end |
83 | 82 | ||
84 | local pok, test_mod: boolean, TestRunner | 83 | local pok, test_mod = pcall(require, "luarocks.test."..test_type) as (boolean, TestRunner) |
85 | if test_type == "command" then | 84 | if not pok then |
86 | pok, test_mod = pcall(require, "luarocks.test.command") | 85 | return nil, "failed loading test execution module luarocks.test."..test_type |
87 | if not pok then | ||
88 | return nil, "failed loading test execution module luarocks.test.command" | ||
89 | end | ||
90 | elseif test_type == "busted" then | ||
91 | pok, test_mod = pcall(require, "luarocks.test.busted") | ||
92 | if not pok then | ||
93 | return nil, "failed loading test execution module luarocks.test.busted" | ||
94 | end | ||
95 | end | 86 | end |
96 | 87 | ||
97 | if prepare then | 88 | if prepare then |