Add a test for csharp, run in CI
This commit is contained in:
parent
b4195eee93
commit
f389d65a24
6 changed files with 100 additions and 4 deletions
|
|
@ -70,6 +70,12 @@ RUN mkdir -p /home/linuxbrew/.linuxbrew &&\
|
|||
|
||||
RUN /home/linuxbrew/.linuxbrew/bin/brew install golang
|
||||
|
||||
# dotnet
|
||||
RUN curl -sSL https://dot.net/v1/dotnet-install.sh \
|
||||
| bash /dev/stdin --channel LTS --install-dir /usr/share/dotnet && \
|
||||
update-alternatives --install /usr/bin/dotnet dotnet \
|
||||
/usr/share/dotnet/dotnet 1
|
||||
|
||||
# clean up
|
||||
RUN /home/linuxbrew/.linuxbrew/bin/brew cleanup && \
|
||||
rm -rf ~/.cache && \
|
||||
|
|
|
|||
65
tests/language_csharp.test.vim
Normal file
65
tests/language_csharp.test.vim
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
function! SetUp()
|
||||
call vimspector#test#setup#SetUpWithMappings( v:none )
|
||||
endfunction
|
||||
|
||||
function! ClearDown()
|
||||
call vimspector#test#setup#ClearDown()
|
||||
endfunction
|
||||
|
||||
function! SetUp_Test_Go_Simple()
|
||||
let g:vimspector_enable_mappings = 'HUMAN'
|
||||
endfunction
|
||||
|
||||
function! Test_CSharp_Simple()
|
||||
let fn='Program.cs'
|
||||
lcd ../support/test/csharp
|
||||
exe 'edit ' . fn
|
||||
|
||||
call vimspector#SetLineBreakpoint( fn, 31 )
|
||||
call vimspector#LaunchWithSettings( {
|
||||
\ 'configuration': 'launch - netcoredbg'
|
||||
\ } )
|
||||
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 31, 7 )
|
||||
call WaitForAssert( {->
|
||||
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( fn, 31 )
|
||||
\ } )
|
||||
|
||||
call vimspector#StepOver()
|
||||
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 32, 12 )
|
||||
call WaitForAssert( {->
|
||||
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( fn, 32 )
|
||||
\ } )
|
||||
|
||||
call vimspector#test#setup#Reset()
|
||||
|
||||
lcd -
|
||||
%bwipeout!
|
||||
endfunction
|
||||
|
||||
|
||||
function! Test_Run_To_Cursor()
|
||||
let fn='Program.cs'
|
||||
lcd ../support/test/csharp
|
||||
exe 'edit ' . fn
|
||||
|
||||
call vimspector#SetLineBreakpoint( fn, 31 )
|
||||
call vimspector#LaunchWithSettings( {
|
||||
\ 'configuration': 'launch - netcoredbg'
|
||||
\ } )
|
||||
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 31, 7 )
|
||||
call WaitForAssert( {->
|
||||
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( fn, 31 )
|
||||
\ } )
|
||||
|
||||
call cursor( 33, 1 )
|
||||
call vimspector#RunToCursor()
|
||||
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 33, 1 )
|
||||
call WaitForAssert( {->
|
||||
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( fn, 33 )
|
||||
\ } )
|
||||
|
||||
call vimspector#test#setup#Reset()
|
||||
lcd -
|
||||
%bwipeout!
|
||||
endfunction
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue