diff options
Diffstat (limited to 'lua')
| -rwxr-xr-x | lua/test.sh | 7 | ||||
| -rw-r--r-- | lua/themes/theme.lua | 0 | ||||
| -rw-r--r-- | lua/visrc.lua | 10 |
3 files changed, 9 insertions, 8 deletions
diff --git a/lua/test.sh b/lua/test.sh index fd2c088..5d9b865 100755 --- a/lua/test.sh +++ b/lua/test.sh @@ -6,16 +6,15 @@ $VIS -v TESTS_OK=0 TESTS_RUN=0 -export VIS_PATH=. -export VIS_THEME=theme - if [ $# -gt 0 ]; then - printf ":help\n:w help\n:qall\n" $VIS && cat help test_files=$* else + printf ':help\n:/ Lua paths/,$ w help\n:qall\n' | $VIS 2> /dev/null && cat help && rm -f help test_files="$(find . -type f -name "*.in") basic_empty_file.in" fi +export VIS_PATH=. + for t in $test_files; do TESTS_RUN=$((TESTS_RUN + 1)) t=${t%.in} diff --git a/lua/themes/theme.lua b/lua/themes/theme.lua deleted file mode 100644 index e69de29..0000000 --- a/lua/themes/theme.lua +++ /dev/null diff --git a/lua/visrc.lua b/lua/visrc.lua index cdb8e1c..9210c26 100644 --- a/lua/visrc.lua +++ b/lua/visrc.lua @@ -3,9 +3,11 @@ dofile("utils.lua") vis.events = {} vis.events.win_open = function(win) -- test.in file passed to vis - in_file = win.file.name - -- use the corresponding test.lua file - lua_file = string.gsub(in_file, '%.in$', '.lua') - dofile(lua_file) + local in_file = win.file.name + if in_file then + -- use the corresponding test.lua file + lua_file = string.gsub(in_file, '%.in$', '.lua') + dofile(lua_file) + end vis:command('q!') end |
