From 468303ad9ec5dc0543cd8f6e5d39d52955844a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 17 Nov 2016 09:48:45 +0100 Subject: test/vis: remove trailing white spaces after pre-processing keys file Using cpp(1) to remove comments might not have been the best idea, some versions of clang leave trailing white space intact whereas gcc removes them. These trailing spaces were wrongly interpreted as input. This hopefully fixes the tests on Mac OS X. --- vis/visrc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vis/visrc.lua b/vis/visrc.lua index 909aa00..a6ece31 100644 --- a/vis/visrc.lua +++ b/vis/visrc.lua @@ -7,8 +7,8 @@ vis.events.win_open = function(win) name = string.gsub(name, '%.in$', '') local file = assert(io.popen(string.format("cpp -P '%s.keys'", name), 'r')) local keys = file:read('*all') + keys = string.gsub(keys, '%s*\n', '') keys = string.gsub(keys, '', ' ') - keys = string.gsub(keys, '\n', '') file:close() vis:feedkeys(keys..'') vis:command(string.format("w! '%s.out'", name)) -- cgit v1.2.3