From 230b3c1485318e3a028a53082627a128ddaa2754 Mon Sep 17 00:00:00 2001 From: Josh Wainwright Date: Thu, 21 Apr 2016 09:05:38 +0100 Subject: Quit vis from within test visrc.lua --- lua/test.sh | 3 +-- lua/visrc.lua | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'lua') diff --git a/lua/test.sh b/lua/test.sh index 852f035..dc77b64 100644 --- a/lua/test.sh +++ b/lua/test.sh @@ -16,8 +16,7 @@ for t in $test_files; do TESTS_RUN=$((TESTS_RUN + 1)) t=${t%.in} t=${t#./} -# vis $t.in - printf "Q:q" | ../util/keys | vis $t.in + $VIS $t.in printf "%-30s" "$t" if [ -e $t.out ]; then diff --git a/lua/visrc.lua b/lua/visrc.lua index dcd4d8e..2c8ff78 100644 --- a/lua/visrc.lua +++ b/lua/visrc.lua @@ -2,13 +2,10 @@ require("utils") 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$', '') require(lua_file) --- These both seem to cause crashes at the moment. --- vis:command('q!') --- --- vis:map(vis.MODE_NORMAL, "Q", function() --- vis:command('q!') --- end) + vis:command('q!') end -- cgit v1.2.3