Skip to content

Commit

Permalink
Merge pull request #3538 from bhcleek/ubuntu-18.04/eol
Browse files Browse the repository at this point in the history
Update required version of Vim
  • Loading branch information
bhcleek committed Jun 13, 2023
2 parents 3289077 + d57b398 commit 1d636fa
Show file tree
Hide file tree
Showing 31 changed files with 160 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fail-fast: false
matrix:
go: ['1.19','1.20']
vim: ['vim-8.0', 'vim-8.2', 'nvim']
vim: ['vim-8.1', 'vim-8.2', 'nvim']
steps:
- name: setup Go
uses: actions/setup-go@v2.1.3
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ USER vim-go
COPY scripts/install-vim /vim-go/scripts/install-vim
WORKDIR /vim-go

RUN scripts/install-vim vim-8.0
RUN scripts/install-vim vim-8.1
RUN scripts/install-vim vim-8.2
RUN scripts/install-vim nvim

COPY . /vim-go/
WORKDIR /vim-go

RUN scripts/install-tools vim-8.0
RUN scripts/install-tools vim-8.1
RUN scripts/install-tools vim-8.2
RUN scripts/install-tools nvim

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VIMS ?= vim-8.0 vim-8.2 nvim
VIMS ?= vim-8.1 vim-8.2 nvim
TEST_FLAGS ?=

all: install lint test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This plugin adds Go language support for Vim, with the following main features:

## Install

vim-go requires at least Vim 8.0.1453 or Neovim 0.4.0.
vim-go requires at least Vim 8.1.2269 or Neovim 0.4.0.

The [**latest stable release**](https://github.com/fatih/vim-go/releases/latest) is the
recommended version to use. If you choose to use the master branch instead,
Expand Down
2 changes: 2 additions & 0 deletions autoload/go/calls_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set cpo&vim
scriptencoding utf-8

func! Test_Callers() abort
let l:wd = getcwd()
try
let l:tmp = gotest#write_file('calls/caller.go', [
\ 'package main',
Expand Down Expand Up @@ -37,6 +38,7 @@ func! Test_Callers() abort

call gotest#assert_quickfix(l:actual, l:expected)
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand Down
2 changes: 2 additions & 0 deletions autoload/go/cmd_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ let s:cpo_save = &cpo
set cpo&vim

func! Test_GoBuildErrors()
let l:wd = getcwd()
try
let g:go_gopls_enabled = 0
let l:filename = 'cmd/bad.go'
Expand All @@ -27,6 +28,7 @@ func! Test_GoBuildErrors()

call gotest#assert_quickfix(actual, l:expected)
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand Down
2 changes: 2 additions & 0 deletions autoload/go/complete_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ endfunction

func! s:getinfo()
let l:filename = 'complete/complete.go'
let l:wd = getcwd()
let l:tmp = gotest#load_fixture(l:filename)
try
call cursor(8, 3)
Expand All @@ -17,6 +18,7 @@ func! s:getinfo()
let actual = go#complete#GetInfo()
call assert_equal(expected, actual)
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunction
Expand Down
2 changes: 2 additions & 0 deletions autoload/go/config_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func! Test_GoplsEnabled_Clear() abort
return
endif

let l:wd = getcwd()
try
let g:go_gopls_enabled = 0

Expand All @@ -94,6 +95,7 @@ func! Test_GoplsEnabled_Clear() abort
\ ] )

finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand Down
8 changes: 8 additions & 0 deletions autoload/go/debug_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function! Test_GoDebugStart_Errors() abort
return
endif

let l:wd = getcwd()
try
let g:go_gopls_enabled = 0
let l:tmp = gotest#load_fixture('debug/compilerror/main.go')
Expand Down Expand Up @@ -60,6 +61,7 @@ function! Test_GoDebugStart_Errors() abort
call assert_false(exists(':GoDebugStop'))

finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
" clear the quickfix lists
call setqflist([], 'r')
Expand All @@ -71,6 +73,7 @@ function! Test_GoDebugModeRemapsAndRestoresKeys() abort
return
endif

let l:wd = getcwd()
try
let g:go_gopls_enabled = 0
let g:go_debug_mappings = {'(go-debug-continue)': {'key': 'q', 'arguments': '<nowait>'}}
Expand All @@ -96,6 +99,7 @@ function! Test_GoDebugModeRemapsAndRestoresKeys() abort
endwhile
call assert_equal('', maparg('q'))
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunction
Expand All @@ -105,6 +109,7 @@ function! Test_GoDebugStopRemovesPlugMappings() abort
return
endif

let l:wd = getcwd()
try
let g:go_gopls_enabled = 0
let l:tmp = gotest#load_fixture('debug/debugmain/debugmain.go')
Expand All @@ -129,6 +134,7 @@ function! Test_GoDebugStopRemovesPlugMappings() abort
endwhile
call assert_equal('', maparg('<Plug>(go-debug-stop'))
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunction
Expand All @@ -141,6 +147,7 @@ function! s:debug(...) abort
return
endif

let l:wd = getcwd()
try
let g:go_gopls_enabled = 0
let $oldgopath = $GOPATH
Expand Down Expand Up @@ -179,6 +186,7 @@ function! s:debug(...) abort

finally
call go#debug#Breakpoint(6)
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunction
Expand Down
14 changes: 14 additions & 0 deletions autoload/go/def_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set cpo&vim
scriptencoding utf-8

func! Test_jump_to_declaration_guru() abort
let l:wd = getcwd()
try
let g:go_gopls_enabled = 0
let l:filename = 'def/jump.go'
Expand All @@ -19,11 +20,13 @@ func! Test_jump_to_declaration_guru() abort
call assert_equal(l:lnum, getcurpos()[1])
call assert_equal(l:col, getcurpos()[2])
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc

func! Test_jump_to_declaration_godef() abort
let l:wd = getcwd()
try
let g:go_gopls_enabled = 0
let l:filename = 'def/jump.go'
Expand All @@ -38,11 +41,13 @@ func! Test_jump_to_declaration_godef() abort
call assert_equal(l:lnum, getcurpos()[1])
call assert_equal(l:col, getcurpos()[2])
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc

func! Test_Jump_leaves_lists() abort
let l:wd = getcwd()
try
let l:filename = 'def/jump.go'
let l:tmp = gotest#load_fixture(l:filename)
Expand Down Expand Up @@ -74,6 +79,7 @@ func! Test_Jump_leaves_lists() abort
let l:actual = getqflist()
call gotest#assert_quickfix(l:actual, l:expected)
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand All @@ -83,6 +89,7 @@ func! Test_DefJump_gopls_simple_first() abort
return
endif

let l:wd = getcwd()
try
let g:go_def_mode = 'gopls'

Expand All @@ -108,6 +115,7 @@ func! Test_DefJump_gopls_simple_first() abort

call assert_equal(l:expected, getpos('.'))
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand All @@ -117,6 +125,7 @@ func! Test_DefJump_gopls_simple_last() abort
return
endif

let l:wd = getcwd()
try
let g:go_def_mode = 'gopls'

Expand All @@ -142,6 +151,7 @@ func! Test_DefJump_gopls_simple_last() abort

call assert_equal(l:expected, getpos('.'))
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand All @@ -151,6 +161,7 @@ func! Test_DefJump_gopls_MultipleCodeUnit_first() abort
return
endif

let l:wd = getcwd()
try
let g:go_def_mode = 'gopls'

Expand All @@ -175,6 +186,7 @@ func! Test_DefJump_gopls_MultipleCodeUnit_first() abort

call assert_equal(l:expected, getpos('.'))
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand All @@ -185,6 +197,7 @@ func! Test_DefJump_gopls_MultipleCodeUnit_last() abort
return
endif

let l:wd = getcwd()
try
let g:go_def_mode = 'gopls'

Expand All @@ -209,6 +222,7 @@ func! Test_DefJump_gopls_MultipleCodeUnit_last() abort

call assert_equal(l:expected, getpos('.'))
finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand Down
2 changes: 2 additions & 0 deletions autoload/go/extract_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ let s:cpo_save = &cpo
set cpo&vim

func! Test_Extract() abort
let l:wd = getcwd()
try
let l:tmp = gotest#write_file('a/a.go', [
\ 'package a',
Expand Down Expand Up @@ -36,6 +37,7 @@ func! Test_Extract() abort
\ '}'])

finally
call go#util#Chdir(l:wd)
call delete(l:tmp, 'rf')
endtry
endfunc
Expand Down
Loading

0 comments on commit 1d636fa

Please sign in to comment.