aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-06-30 01:15:01 -0300
committerHisham <hisham@gobolinux.org>2016-06-30 01:15:01 -0300
commitf2beb5ee1fd2c54d59a43f4f2a8fe0f7a1701daa (patch)
tree46f958aa7efb4d6b31612178026228ba49e612f5 /test
parent6b38323d10743c83e377d9be2fa734a3a3d5a300 (diff)
downloadluarocks-f2beb5ee1fd2c54d59a43f4f2a8fe0f7a1701daa.tar.gz
luarocks-f2beb5ee1fd2c54d59a43f4f2a8fe0f7a1701daa.tar.bz2
luarocks-f2beb5ee1fd2c54d59a43f4f2a8fe0f7a1701daa.zip
Core modules reorganization.
Isolate all modules used by luarocks.loader in a luarocks.core.* namespace. Core modules can only require other core modules, and they only use require() at the top-level chunk. In other words, after luarocks.loader is setup, package.path can be altered at will and it should not affect the ability of luarocks.loader to run, and the luarocks.loader modules should not interfere with modules loaded later. This was motivated by @robooo's GSoC work on porting the LuaRocks test suite to Lua using Busted. Busted itself runs using luarocks.loader, and we need to ensure that the modules loaded by the tests do not conflict with the ones used by luarocks.loader. A circular dependency between luarocks.manif and luarocks.search was removed by creating a separate luarocks.manif.writer module. Also, luarocks-admin commands were moved to a luarocks.admin.* namespace.
Diffstat (limited to 'test')
-rwxr-xr-xtest/testing.sh1
1 files changed, 0 insertions, 1 deletions
diff --git a/test/testing.sh b/test/testing.sh
index e4b5d8c2..0dd34bf1 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -577,7 +577,6 @@ fail_config_system_config() { rm -f "$testing_lrprefix/etc/luarocks/config.lua";
577test_config_system_config() { mkdir -p "$testing_lrprefix/etc/luarocks"; touch "$testing_lrprefix/etc/luarocks/config.lua"; $luarocks config --system-config; err=$?; rm -f "$testing_lrprefix/etc/luarocks/config.lua"; return $err; } 577test_config_system_config() { mkdir -p "$testing_lrprefix/etc/luarocks"; touch "$testing_lrprefix/etc/luarocks/config.lua"; $luarocks config --system-config; err=$?; rm -f "$testing_lrprefix/etc/luarocks/config.lua"; return $err; }
578fail_config_system_config_invalid() { mkdir -p "$testing_lrprefix/etc/luarocks"; echo "if if if" > "$testing_lrprefix/etc/luarocks/config.lua"; $luarocks config --system-config; err=$?; rm -f "$testing_lrprefix/etc/luarocks/config.lua"; return $err; } 578fail_config_system_config_invalid() { mkdir -p "$testing_lrprefix/etc/luarocks"; echo "if if if" > "$testing_lrprefix/etc/luarocks/config.lua"; $luarocks config --system-config; err=$?; rm -f "$testing_lrprefix/etc/luarocks/config.lua"; return $err; }
579test_config_user_config() { $luarocks config --user-config; } 579test_config_user_config() { $luarocks config --user-config; }
580fail_config_user_config() { LUAROCKS_CONFIG="/missing_file.lua" $luarocks config --user-config; }
581test_config_rock_trees() { $luarocks config --rock-trees; } 580test_config_rock_trees() { $luarocks config --rock-trees; }
582test_config_help() { $luarocks help config; } 581test_config_help() { $luarocks help config; }
583 582