From 2b133101cf67b523c2503ef715dfb9ebfa732da2 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius Date: Mon, 18 Sep 2017 21:06:55 +0300 Subject: win: vim_FullName(): force backslashes #7287 - Replace obvious cases of '/' literal with PATHSEP. (There are still some remaining cases that need closer inspection.) - Fixup tests: ui/screen_basic closes #7117 ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714 --- test/functional/ui/screen_basic_spec.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test/functional/ui/screen_basic_spec.lua') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index bfcdc7f652..9032239b31 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -5,6 +5,7 @@ local feed, command = helpers.feed, helpers.command local insert = helpers.insert local eq = helpers.eq local eval = helpers.eval +local iswin = helpers.iswin describe('screen', function() local screen @@ -120,8 +121,15 @@ describe('Screen', function() it('has correct default title with named file', function() local expected = 'myfile (/mydir) - NVIM' + if iswin() then + expected = 'myfile (C:\\mydir) - NVIM' + end command('set title') - command('file /mydir/myfile') + if iswin() then + command('file C:\\mydir\\myfile') + else + command('file /mydir/myfile') + end screen:expect(function() eq(expected, screen.title) end) -- cgit From 6f7754dfa0c6a9ec2a1e7db3685ffd41b207b882 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 2 Oct 2017 00:24:19 +0200 Subject: test: avoid extra clear() calls also: various other cleanup --- test/functional/ui/screen_basic_spec.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'test/functional/ui/screen_basic_spec.lua') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 9032239b31..b31d9cb32f 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -120,16 +120,10 @@ describe('Screen', function() end) it('has correct default title with named file', function() - local expected = 'myfile (/mydir) - NVIM' - if iswin() then - expected = 'myfile (C:\\mydir) - NVIM' - end + local expected = (iswin() and 'myfile (C:\\mydir) - NVIM' + or 'myfile (/mydir) - NVIM') command('set title') - if iswin() then - command('file C:\\mydir\\myfile') - else - command('file /mydir/myfile') - end + command(iswin() and 'file C:\\mydir\\myfile' or 'file /mydir/myfile') screen:expect(function() eq(expected, screen.title) end) -- cgit