aboutsummaryrefslogtreecommitdiff
path: root/spec/path_spec.lua
diff options
context:
space:
mode:
authorrobooo <robo.karasek@gmail.com>2016-07-07 21:58:19 +0200
committerHisham Muhammad <hisham@gobolinux.org>2016-07-07 16:58:19 -0300
commit5af7e0d7c2dcf65e41ae8523f3771e9528be32a7 (patch)
treebcd14624e0566a23da2e708675197d212cecf35d /spec/path_spec.lua
parentb5b285a678fe78b80d452cc9eb7565b8bf087b81 (diff)
downloadluarocks-5af7e0d7c2dcf65e41ae8523f3771e9528be32a7.tar.gz
luarocks-5af7e0d7c2dcf65e41ae8523f3771e9528be32a7.tar.bz2
luarocks-5af7e0d7c2dcf65e41ae8523f3771e9528be32a7.zip
New test-suite for LuaRocks (#581)
First version of new test-suite, using Busted framework based on Google Summer of Code project: https://summerofcode.withgoogle.com/projects/#5695811874717696 * Rewritten from Bash to Lua * Tests now check if they did what they were supposed to, beyond only checking success or failure of the `luarocks` command * Support for black-box (launching `luarocks` as an external command) and white-box (testing functions in modules directly) testing
Diffstat (limited to 'spec/path_spec.lua')
-rw-r--r--spec/path_spec.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/path_spec.lua b/spec/path_spec.lua
new file mode 100644
index 00000000..266ada89
--- /dev/null
+++ b/spec/path_spec.lua
@@ -0,0 +1,28 @@
1local test_env = require("test/test_environment")
2local lfs = require("lfs")
3
4test_env.unload_luarocks()
5local path = require("luarocks.path")
6
7expose("LuaRocks path tests #blackbox #b_path", function()
8 before_each(function()
9 test_env.setup_specs(extra_rocks)
10 run = test_env.run
11 end)
12
13 it("LuaRocks path bin", function()
14 assert.is_true(run.luarocks_bool("path --bin"))
15 end)
16
17 it("LuaRocks path lr-path", function()
18 assert.is_true(run.luarocks_bool("path --lr-path"))
19 end)
20
21 it("LuaRocks path lr-cpath", function()
22 assert.is_true(run.luarocks_bool("path --lr-cpath"))
23 end)
24
25 it("LuaRocks path with tree", function()
26 assert.is_true(run.luarocks_bool("path --tree=lua_modules"))
27 end)
28end)