1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
Description: Adding a simple test for fortran completer
This is Debian-specific as enabling the completer is a
Debian-specific patch in ycmd.
Author: David Kalnischkies <donkult@debian.org>
Forwarded: not-needed
--- /dev/null
+++ b/test/fortran.test.vim
@@ -0,0 +1,25 @@
+function! SetUp()
+ let g:ycm_auto_trigger = 1
+ let g:ycm_keep_logfiles = 1
+ let g:ycm_log_level = 'DEBUG'
+ let g:ycm_always_populate_location_list = 1
+
+ " diagnostics take ages
+ let g:ycm_test_min_delay = 7
+ call youcompleteme#test#setup#SetUp()
+endfunction
+
+function! TearDown()
+ call youcompleteme#test#setup#CleanUp()
+endfunction
+
+function! Test_MessagePoll_After_LocationList()
+ call youcompleteme#test#setup#OpenFile(
+ \ '/test/testdata/diagnostics/foo.f90', {} )
+
+ call assert_equal( 'fortran', &ft )
+ call WaitForAssert( {-> assert_equal( 1, len( sign_getplaced(
+ \ '%',
+ \ { 'group': 'ycm_signs' } )[ 0 ][ 'signs' ] ) ) } )
+ call assert_equal( 5, sign_getplaced('%', {'group': 'ycm_signs'})[0]['signs'][0]['lnum'] )
+endfunction
--- /dev/null
+++ b/test/testdata/diagnostics/foo.f90
@@ -0,0 +1,6 @@
+PROGRAM hello
+ INTEGER(4) :: i = 0
+ ! a comment
+ PRINT *, 'Hello, World!'
+ REAL(4) :: i = 0
+END PROGRAM hello
|