From 88974c8e66c7d2b18d682dfee860dbc9839d160b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 2 Jun 2018 21:53:03 -0400 Subject: [PATCH 1/8] functionaltests: win: enable gzip test Close gzip file handles. --- test/functional/legacy/011_autocommands_spec.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/functional/legacy/011_autocommands_spec.lua b/test/functional/legacy/011_autocommands_spec.lua index 379646b2ba..9529cb03bb 100644 --- a/test/functional/legacy/011_autocommands_spec.lua +++ b/test/functional/legacy/011_autocommands_spec.lua @@ -18,6 +18,7 @@ local clear, feed_command, expect, eq, neq, dedent, write_file, feed = helpers.clear, helpers.feed_command, helpers.expect, helpers.eq, helpers.neq, helpers.dedent, helpers.write_file, helpers.feed local iswin = helpers.iswin +local read_file = helpers.read_file local function has_gzip() local null = iswin() and 'nul' or '/dev/null' @@ -60,7 +61,7 @@ describe('file reading, writing and bufnew and filter autocommands', function() os.remove('test.out') end) - if iswin() or not has_gzip() then + if not has_gzip() then pending('skipped (missing `gzip` utility)', function() end) else @@ -77,7 +78,7 @@ describe('file reading, writing and bufnew and filter autocommands', function() it('BufReadPre, BufReadPost (using gzip)', function() prepare_gz_file('Xtestfile', text1) - local gzip_data = io.open('Xtestfile.gz'):read('*all') + local gzip_data = read_file('Xtestfile.gz') feed_command('let $GZIP = ""') -- Setup autocommands to decompress before reading and re-compress afterwards. feed_command("au BufReadPre *.gz exe '!gzip -d ' . shellescape(expand(''))") @@ -91,7 +92,7 @@ describe('file reading, writing and bufnew and filter autocommands', function() -- Expect the decompressed file in the buffer. expect(text1) -- Expect the original file to be unchanged. - eq(gzip_data, io.open('Xtestfile.gz'):read('*all')) + eq(gzip_data, read_file('Xtestfile.gz')) end) -- luacheck: ignore 621 (Indentation) From bc5fb82c6d20b39e8b328f6f0b48d3b2e314facb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 23 Oct 2018 18:42:59 -0400 Subject: [PATCH 2/8] functionaltest: win: enable diffput,diffget test --- test/functional/api/buffer_updates_spec.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/functional/api/buffer_updates_spec.lua b/test/functional/api/buffer_updates_spec.lua index e5cc747f8a..b54d9e1f6e 100644 --- a/test/functional/api/buffer_updates_spec.lua +++ b/test/functional/api/buffer_updates_spec.lua @@ -538,10 +538,6 @@ describe('API: buffer events:', function() end) it('works with :diffput and :diffget', function() - if os.getenv("APPVEYOR") then - pending("Fails on appveyor for some reason.", function() end) - end - local b1, tick1 = editoriginal(true, {"AAA", "BBB"}) local channel = nvim('get_api_info')[1] command('diffthis') From fe2e7cfdee91a3e13058461f3565fe96999232ac Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 23 Oct 2018 22:57:27 -0400 Subject: [PATCH 3/8] functionaltest: enable FilterReadPre,FilterReadPost test --- test/functional/legacy/011_autocommands_spec.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/test/functional/legacy/011_autocommands_spec.lua b/test/functional/legacy/011_autocommands_spec.lua index 9529cb03bb..7cc31dc787 100644 --- a/test/functional/legacy/011_autocommands_spec.lua +++ b/test/functional/legacy/011_autocommands_spec.lua @@ -143,7 +143,6 @@ describe('file reading, writing and bufnew and filter autocommands', function() end) it('FilterReadPre, FilterReadPost', function() - if helpers.pending_win32(pending) then return end -- Write a special input file for this test block. write_file('test.out', dedent([[ startstart From 8e44396794221f2bdf3909970b2270234d3f7cdd Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 24 Oct 2018 05:28:39 -0400 Subject: [PATCH 4/8] functionaltest: enable buffered output tests --- test/functional/core/channels_spec.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua index f79f208b69..7b89172f92 100644 --- a/test/functional/core/channels_spec.lua +++ b/test/functional/core/channels_spec.lua @@ -192,7 +192,6 @@ describe('channels', function() end) it('can use buffered output mode', function() - if helpers.pending_win32(pending) then return end source([[ let g:job_opts = { \ 'on_stdout': function('OnEvent'), @@ -225,7 +224,6 @@ describe('channels', function() end) it('can use buffered output mode with no stream callback', function() - if helpers.pending_win32(pending) then return end source([[ function! OnEvent(id, data, event) dict call rpcnotify(1, a:event, a:id, a:data, self.stdout) From 4abed174965d306318ca2c78818d1141c268583c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 26 Oct 2018 07:05:52 -0400 Subject: [PATCH 5/8] functionaltest: win: enable shada FileWriteCmd --- test/functional/plugin/shada_spec.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/test/functional/plugin/shada_spec.lua b/test/functional/plugin/shada_spec.lua index 5a5b4df1ef..1482d83ee6 100644 --- a/test/functional/plugin/shada_spec.lua +++ b/test/functional/plugin/shada_spec.lua @@ -2301,7 +2301,6 @@ describe('plugin/shada.vim', function() describe('event FileWriteCmd', function() it('works', function() - if helpers.pending_win32(pending) then return end nvim('set_var', 'shada#add_own_header', 0) curbuf('set_lines', 0, 1, true, { 'Jump with timestamp ' .. epoch .. ':', From 7ab0e8c8dddbb359eff77ea696940da06cce59dc Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 26 Oct 2018 18:44:27 -0400 Subject: [PATCH 6/8] functionaltest: enable job channel test --- test/functional/api/vim_spec.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 5ca133267d..a9d137391e 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -841,10 +841,6 @@ describe('API', function() end) it('works for job channel', function() - if iswin() and os.getenv('APPVEYOR') ~= nil then - pending("jobstart(['cat']) unreliable on appveyor") - return - end eq(3, eval("jobstart(['cat'], {'rpc': v:true})")) local info = { stream='job', From 9929af47fece84991c6527aca3ea86ff35a12956 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 12 Aug 2018 07:39:46 -0400 Subject: [PATCH 7/8] ci: win: use Ninja for CMake Generator --- ci/build.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/build.ps1 b/ci/build.ps1 index c82a74714c..c5e6ab7925 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -38,15 +38,18 @@ if ($compiler -eq 'MINGW') { # These are native MinGW builds, but they use the toolchain inside # MSYS2, this allows using all the dependencies and tools available # in MSYS2, but we cannot build inside the MSYS2 shell. - $cmakeGenerator = 'MinGW Makefiles' - $cmakeGeneratorArgs = 'VERBOSE=1' + $cmakeGenerator = 'Ninja' + $cmakeGeneratorArgs = '-v' + $mingwPackages = @('ninja', 'cmake', 'perl', 'diffutils', 'unibilium').ForEach({ + "mingw-w64-$arch-$_" + }) # Add MinGW to the PATH $env:PATH = "C:\msys64\mingw$bits\bin;$env:PATH" # Build third-party dependencies C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed - C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-$arch-cmake mingw-w64-$arch-perl mingw-w64-$arch-diffutils mingw-w64-$arch-unibilium" ; exitIfFailed + C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed } elseif ($compiler -eq 'MSVC') { $cmakeGeneratorArgs = '/verbosity:normal' @@ -58,9 +61,6 @@ elseif ($compiler -eq 'MSVC') { } } -# Remove Git Unix utilities from the PATH -$env:PATH = $env:PATH.Replace('C:\Program Files\Git\usr\bin', '') - # Setup python (use AppVeyor system python) C:\Python27\python.exe -m pip install neovim ; exitIfFailed C:\Python35\python.exe -m pip install neovim ; exitIfFailed From 8ce3d0174eb25d6b48995106a7a62c663fd95bac Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 19 Oct 2018 00:07:58 -0400 Subject: [PATCH 8/8] ci: win: enable powershell's strict mode Give variables a default value to pass strict mode. $ErrorActionPreference defines the default behavior if a powershell command fails. If it's set to 'stop', then it aborts the script on the first unresolved error. This behavior extends to native programs like cmake but do not depend on it. https://github.com/PowerShell/PowerShell/issues/3996 --- ci/build.ps1 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/ci/build.ps1 b/ci/build.ps1 index c5e6ab7925..5b3eb4d27d 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -1,4 +1,5 @@ -Set-PSDebug -Trace 1 +$ErrorActionPreference = 'stop' +Set-PSDebug -Strict -Trace 1 $env:CONFIGURATION -match '^(?\w+)_(?32|64)(?:-(?