aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--test/functional/legacy/022_line_ending_spec.lua25
-rw-r--r--test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua43
-rw-r--r--test/functional/legacy/077_mf_hash_grow_spec.lua52
-rw-r--r--test/functional/legacy/084_curswant_spec.lua49
-rw-r--r--test/functional/legacy/098_scrollbind_spec.lua48
-rw-r--r--test/functional/legacy/104_let_assignment_spec.lua54
7 files changed, 2 insertions, 271 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 790fc9fb41..4affe8795c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -303,8 +303,10 @@ if(UNIX)
if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
add_compile_options(-fstack-protector-strong)
+ link_libraries(-fstack-protector-strong)
elseif(HAS_FSTACK_PROTECTOR_FLAG)
add_compile_options(-fstack-protector --param ssp-buffer-size=4)
+ link_libraries(-fstack-protector --param ssp-buffer-size=4)
endif()
endif()
diff --git a/test/functional/legacy/022_line_ending_spec.lua b/test/functional/legacy/022_line_ending_spec.lua
deleted file mode 100644
index fb4b782011..0000000000
--- a/test/functional/legacy/022_line_ending_spec.lua
+++ /dev/null
@@ -1,25 +0,0 @@
--- Tests for file with some lines ending in CTRL-M, some not
-
-local helpers = require('test.functional.helpers')(after_each)
-local clear, feed = helpers.clear, helpers.feed
-local feed_command, expect = helpers.feed_command, helpers.expect
-
-describe('line ending', function()
- setup(clear)
-
- it('is working', function()
- feed('i', [[
- this lines ends in a<C-V><C-M>
- this one doesn't
- this one does<C-V><C-M>
- and the last one doesn't]], '<ESC>')
-
- feed_command('set ta tx')
- feed_command('e!')
-
- expect("this lines ends in a\r\n"..
- "this one doesn't\n"..
- "this one does\r\n"..
- "and the last one doesn't")
- end)
-end)
diff --git a/test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua b/test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua
deleted file mode 100644
index b526d82519..0000000000
--- a/test/functional/legacy/041_writing_and_reading_hundred_kbyte_spec.lua
+++ /dev/null
@@ -1,43 +0,0 @@
--- Test for writing and reading a file of over 100 Kbyte
-
-local helpers = require('test.functional.helpers')(after_each)
-
-local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
-local command, expect = helpers.command, helpers.expect
-local wait = helpers.wait
-
-describe('writing and reading a file of over 100 Kbyte', function()
- setup(clear)
-
- it('is working', function()
- insert([[
- This is the start
- This is the leader
- This is the middle
- This is the trailer
- This is the end]])
-
- feed('kY3000p2GY3000p')
- wait()
-
- command('w! test.out')
- command('%d')
- command('e! test.out')
- command('yank A')
- command('3003yank A')
- command('6005yank A')
- command('%d')
- command('0put a')
- command('$d')
- command('w!')
-
- expect([[
- This is the start
- This is the middle
- This is the end]])
- end)
-
- teardown(function()
- os.remove('test.out')
- end)
-end)
diff --git a/test/functional/legacy/077_mf_hash_grow_spec.lua b/test/functional/legacy/077_mf_hash_grow_spec.lua
deleted file mode 100644
index 4719a3ecbf..0000000000
--- a/test/functional/legacy/077_mf_hash_grow_spec.lua
+++ /dev/null
@@ -1,52 +0,0 @@
--- Inserts 2 million lines with consecutive integers starting from 1
--- (essentially, the output of GNU's seq 1 2000000), writes them to Xtest
--- and calculates its cksum.
--- We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess
--- up the lines the checksum would differ.
--- cksum is part of POSIX and so should be available on most Unixes.
--- If it isn't available then the test will be skipped.
-
-local helpers = require('test.functional.helpers')(after_each)
-
-local feed = helpers.feed
-local wait = helpers.wait
-local clear = helpers.clear
-local expect = helpers.expect
-local command = helpers.command
-
-describe('mf_hash_grow()', function()
- setup(clear)
-
- -- Check to see if cksum exists, otherwise skip the test
- local null = helpers.iswin() and 'nul' or '/dev/null'
- if os.execute('cksum --help >' .. null .. ' 2>&1') ~= 0 then
- pending('was not tested because cksum was not found', function() end)
- else
- it('is working', function()
- command('set fileformat=unix undolevels=-1')
-
- -- Fill the buffer with numbers 1 - 2000000
- command('let i = 1')
- command('while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile')
-
- -- Delete empty first line, save to Xtest, and clear buffer
- feed('ggdd<cr>')
- wait()
- command('w! Xtest')
- feed('ggdG<cr>')
- wait()
-
- -- Calculate the cksum of Xtest and delete first line
- command('r !cksum Xtest')
- feed('ggdd<cr>')
-
- -- Assert correct output of cksum.
- expect([[
- 3678979763 14888896 Xtest]])
- end)
- end
-
- teardown(function()
- os.remove('Xtest')
- end)
-end)
diff --git a/test/functional/legacy/084_curswant_spec.lua b/test/functional/legacy/084_curswant_spec.lua
deleted file mode 100644
index 42cb2fc56d..0000000000
--- a/test/functional/legacy/084_curswant_spec.lua
+++ /dev/null
@@ -1,49 +0,0 @@
--- Tests for curswant not changing when setting an option.
-
-local helpers = require('test.functional.helpers')(after_each)
-local insert, source = helpers.insert, helpers.source
-local clear, expect = helpers.clear, helpers.expect
-
-describe('curswant', function()
- setup(clear)
-
- -- luacheck: ignore 621 (Indentation)
- it('is working', function()
- insert([[
- start target options
- tabstop
- timeoutlen
- ttimeoutlen
- end target options]])
-
- source([[
- /^start target options$/+1,/^end target options$/-1 yank
- let target_option_names = split(@0)
- function TestCurswant(option_name)
- normal! ggf8j
- let curswant_before = winsaveview().curswant
- execute 'let' '&'.a:option_name '=' '&'.a:option_name
- let curswant_after = winsaveview().curswant
- return [a:option_name, curswant_before, curswant_after]
- endfunction
-
- new
- put =['1234567890', '12345']
- 1 delete _
- let result = []
- for option_name in target_option_names
- call add(result, TestCurswant(option_name))
- endfor
-
- new
- put =map(copy(result), 'join(v:val, '' '')')
- 1 delete _
- ]])
-
- -- Assert buffer contents.
- expect([[
- tabstop 7 4
- timeoutlen 7 7
- ttimeoutlen 7 7]])
- end)
-end)
diff --git a/test/functional/legacy/098_scrollbind_spec.lua b/test/functional/legacy/098_scrollbind_spec.lua
deleted file mode 100644
index d22aefdcbc..0000000000
--- a/test/functional/legacy/098_scrollbind_spec.lua
+++ /dev/null
@@ -1,48 +0,0 @@
--- Test for 'scrollbind' causing an unexpected scroll of one of the windows.
-
-local helpers = require('test.functional.helpers')(after_each)
-local source = helpers.source
-local clear, expect = helpers.clear, helpers.expect
-
-describe('scrollbind', function()
- setup(clear)
-
- it('is working', function()
- source([[
- set laststatus=0
- let g:totalLines = &lines * 20
- let middle = g:totalLines / 2
- wincmd n
- wincmd o
- for i in range(1, g:totalLines)
- call setline(i, 'LINE ' . i)
- endfor
- exe string(middle)
- normal zt
- normal M
- aboveleft vert new
- for i in range(1, g:totalLines)
- call setline(i, 'line ' . i)
- endfor
- exe string(middle)
- normal zt
- normal M
- setl scb | wincmd p
- setl scb
- wincmd w
- let topLineLeft = line('w0')
- wincmd p
- let topLineRight = line('w0')
- setl noscrollbind
- wincmd p
- setl noscrollbind
- q!
- %del _
- call setline(1, 'Difference between the top lines (left - right): ' . string(topLineLeft - topLineRight))
- brewind
- ]])
-
- -- Assert buffer contents.
- expect("Difference between the top lines (left - right): 0")
- end)
-end)
diff --git a/test/functional/legacy/104_let_assignment_spec.lua b/test/functional/legacy/104_let_assignment_spec.lua
deleted file mode 100644
index a03bb026f6..0000000000
--- a/test/functional/legacy/104_let_assignment_spec.lua
+++ /dev/null
@@ -1,54 +0,0 @@
--- Tests for :let.
-
-local helpers = require('test.functional.helpers')(after_each)
-local clear, source = helpers.clear, helpers.source
-local command, expect = helpers.command, helpers.expect
-
-describe(':let', function()
- setup(clear)
-
- it('is working', function()
- command('set runtimepath+=test/functional/fixtures')
-
- -- Test to not autoload when assigning. It causes internal error.
- source([[
- try
- let Test104#numvar = function('tr')
- $put ='OK: ' . string(Test104#numvar)
- catch
- $put ='FAIL: ' . v:exception
- endtry
- let a = 1
- let b = 2
- for letargs in ['a b', '{0 == 1 ? "a" : "b"}', '{0 == 1 ? "a" : "b"} a', 'a {0 == 1 ? "a" : "b"}']
- try
- redir => messages
- execute 'let' letargs
- redir END
- $put ='OK:'
- $put =split(substitute(messages, '\n', '\0 ', 'g'), '\n')
- catch
- $put ='FAIL: ' . v:exception
- redir END
- endtry
- endfor]])
-
- -- Remove empty line
- command('1d')
-
- -- Assert buffer contents.
- expect([[
- OK: function('tr')
- OK:
- a #1
- b #2
- OK:
- b #2
- OK:
- b #2
- a #1
- OK:
- a #1
- b #2]])
- end)
-end)