diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
commit | 7a7f497b483cd65e340064f23ed1c73425ecba0a (patch) | |
tree | d5c99ea22a1e10300d06165f8ac96df6b0dc59e1 /test/functional/legacy/096_location_list_spec.lua | |
parent | 1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (diff) | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
download | rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.gz rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.bz2 rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.zip |
Merge remote-tracking branch 'upstream/master' into aucmd_textputpost
Diffstat (limited to 'test/functional/legacy/096_location_list_spec.lua')
-rw-r--r-- | test/functional/legacy/096_location_list_spec.lua | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/test/functional/legacy/096_location_list_spec.lua b/test/functional/legacy/096_location_list_spec.lua index b21a2085f6..2817d5d240 100644 --- a/test/functional/legacy/096_location_list_spec.lua +++ b/test/functional/legacy/096_location_list_spec.lua @@ -45,20 +45,18 @@ describe('location list', function() setl readonly exe 'doautocmd BufRead ' . substitute(a:name, '\v^test://(.*)', '\1', '') endfunction - ]] .. - - -- Register the above buffer setup function to be executed before - -- starting to edit a new "test protocol" buffer. - [[ + ]] + -- Register the above buffer setup function to be executed before + -- starting to edit a new "test protocol" buffer. + .. [[ augroup testgroup au! autocmd BufReadCmd test://* call ReadTestProtocol(expand("<amatch>")) augroup END - ]] .. - - -- Populate the location list of the current window with some test - -- protocol file locations such as "test://foo.txt". - [[ + ]] + -- Populate the location list of the current window with some test + -- protocol file locations such as "test://foo.txt". + .. [[ let words = [ "foo", "bar", "baz", "quux", "shmoo", "spam", "eggs" ] let qflist = [] for word in words @@ -68,11 +66,12 @@ describe('location list', function() " valid. call setloclist(0, qflist, ' ') endfor - ]]) + ]] + ) -- Set up the result buffer. command('enew') - command('w! '..test_file) + command('w! ' .. test_file) command('b 1') -- Test A. @@ -99,14 +98,16 @@ describe('location list', function() command([[let locationListFileName = substitute(getline(line('.')), '\([^|]*\)|.*', '\1', '')]]) command('wincmd n') command('wincmd K') - command('b '..test_file) + command('b ' .. test_file) -- Prepare test output and write it to the result buffer. command([[let fileName = substitute(fileName, '\\', '/', 'g')]]) command([[let locationListFileName = substitute(locationListFileName, '\\', '/', 'g')]]) command([[call append(line('$'), "Test A:")]]) command([[call append(line('$'), " - file name displayed: " . fileName)]]) - command([[call append(line('$'), " - quickfix claims that the file name displayed is: " . locationListFileName)]]) + command( + [[call append(line('$'), " - quickfix claims that the file name displayed is: " . locationListFileName)]] + ) command('w') -- Clean slate for the next test. @@ -132,7 +133,7 @@ describe('location list', function() command('let numberOfWindowsOpen = winnr("$")') command('wincmd n') command('wincmd K') - command('b '..test_file) + command('b ' .. test_file) -- Prepare test output and write it to the result buffer. command('call append(line("$"), "Test B:")') @@ -170,12 +171,14 @@ describe('location list', function() command('let bufferName = expand("%")') command('wincmd n') command('wincmd K') - command('b '..test_file) + command('b ' .. test_file) -- Prepare test output and write it to the result buffer. command([[let bufferName = substitute(bufferName, '\\', '/', 'g')]]) command([[call append(line("$"), "Test C:")]]) - command([[call append(line('$'), " - 'buftype' of the location list window: " . locationListWindowBufType)]]) + command( + [[call append(line('$'), " - 'buftype' of the location list window: " . locationListWindowBufType)]] + ) command([[call append(line('$'), " - buffer displayed in the 2nd window: " . bufferName)]]) command('w') command('wincmd o') |