aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/eval/null_spec.lua2
-rw-r--r--test/functional/legacy/mksession_spec.lua42
-rw-r--r--test/functional/ui/messages_spec.lua4
3 files changed, 45 insertions, 3 deletions
diff --git a/test/functional/eval/null_spec.lua b/test/functional/eval/null_spec.lua
index 4f29811095..8f0041ff27 100644
--- a/test/functional/eval/null_spec.lua
+++ b/test/functional/eval/null_spec.lua
@@ -97,7 +97,7 @@ describe('NULL', function()
null_expr_test('makes filter() return v:_null_list', 'filter(L, "1") is# L', 0, 1)
null_test('is treated by :let as empty list', ':let [l] = L', 'Vim(let):E688: More targets than List items')
null_expr_test('is accepted as an empty list by inputlist()', '[feedkeys("\\n"), inputlist(L)]',
- 'Type number and <Enter> or click with mouse (empty cancels): ', {0, 0})
+ 'Type number and <Enter> or click with the mouse (q or empty cancels): ', {0, 0})
null_expr_test('is accepted as an empty list by writefile()',
('[writefile(L, "%s"), readfile("%s")]'):format(tmpfname, tmpfname),
0, {0, {}})
diff --git a/test/functional/legacy/mksession_spec.lua b/test/functional/legacy/mksession_spec.lua
new file mode 100644
index 0000000000..a2af891107
--- /dev/null
+++ b/test/functional/legacy/mksession_spec.lua
@@ -0,0 +1,42 @@
+local helpers = require('test.functional.helpers')(after_each)
+local clear = helpers.clear
+local command = helpers.command
+local funcs = helpers.funcs
+local eq = helpers.eq
+
+describe('mksession', function()
+ before_each(clear)
+
+ after_each(function()
+ os.remove('Xtest_mks.out')
+ end)
+
+ it('supports "skiprtp" value', function()
+ command('set sessionoptions&vi')
+ command('set rtp+=$HOME')
+ command('set pp+=$HOME')
+ command('mksession! Xtest_mks.out')
+ local found_rtp = 0
+ local found_pp = 0
+ for _, line in pairs(funcs.readfile('Xtest_mks.out', 'b')) do
+ if line:find('set runtimepath') then
+ found_rtp = found_rtp + 1
+ end
+ if line:find('set packpath') then
+ found_pp = found_pp + 1
+ end
+ end
+ eq(1, found_rtp)
+ eq(1, found_pp)
+
+ command('set sessionoptions+=skiprtp')
+ command('mksession! Xtest_mks.out')
+ local found_rtp_or_pp = 0
+ for _, line in pairs(funcs.readfile('Xtest_mks.out', 'b')) do
+ if line:find('set runtimepath') or line:find('set packpath') then
+ found_rtp_or_pp = found_rtp_or_pp + 1
+ end
+ end
+ eq(0, found_rtp_or_pp)
+ end)
+end)
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 9d7719a7c0..72468392ee 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -811,7 +811,7 @@ describe('ui/ext_messages', function()
{1:~ }|
{1:^~ }|
]], messages={
- {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Helli"\nType number and <Enter> or click with mouse (empty cancels): ' } }, kind = ""}
+ {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Helli"\nType number and <Enter> or click with the mouse (q or empty cancels): ' } }, kind = ""}
}}
feed('1')
@@ -822,7 +822,7 @@ describe('ui/ext_messages', function()
{1:~ }|
{1:^~ }|
]], messages={
- {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Helli"\nType number and <Enter> or click with mouse (empty cancels): ' } }, kind = ""},
+ {content = { { 'Change "helllo" to:\n 1 "Hello"\n 2 "Hallo"\n 3 "Helli"\nType number and <Enter> or click with the mouse (q or empty cancels): ' } }, kind = ""},
{ content = { { "1" } }, kind = "" }
}}