diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-09-09 04:00:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 04:00:35 -0700 |
commit | f0334c2c711ab6d2cd123f7506497c1311b0b926 (patch) | |
tree | 96a58f869698b9e80662f0793fdcc72a32293d64 /test/functional/core/startup_spec.lua | |
parent | 8a2aec99748229ad9d1e12c1cbc0768d063e8eed (diff) | |
parent | c8e3618e0e68485c92bba3790a06d472d9b62697 (diff) | |
download | rneovim-f0334c2c711ab6d2cd123f7506497c1311b0b926.tar.gz rneovim-f0334c2c711ab6d2cd123f7506497c1311b0b926.tar.bz2 rneovim-f0334c2c711ab6d2cd123f7506497c1311b0b926.zip |
Merge #30312 from justinmk/testslashes
Diffstat (limited to 'test/functional/core/startup_spec.lua')
-rw-r--r-- | test/functional/core/startup_spec.lua | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 8d6ba9712a..f48bcb9360 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -27,7 +27,6 @@ local sleep = vim.uv.sleep local startswith = vim.startswith local write_file = t.write_file local api = n.api -local alter_slashes = n.alter_slashes local is_os = t.is_os local dedent = t.dedent local tbl_map = vim.tbl_map @@ -40,22 +39,15 @@ local testlog = 'Xtest-startupspec-log' describe('startup', function() it('--clean', function() clear() - ok( - string.find( - alter_slashes(api.nvim_get_option_value('runtimepath', {})), - fn.stdpath('config'), - 1, - true - ) ~= nil + matches( + vim.pesc(t.fix_slashes(fn.stdpath('config'))), + t.fix_slashes(api.nvim_get_option_value('runtimepath', {})) ) + clear('--clean') ok( - string.find( - alter_slashes(api.nvim_get_option_value('runtimepath', {})), - fn.stdpath('config'), - 1, - true - ) == nil + not t.fix_slashes(api.nvim_get_option_value('runtimepath', {})) + :match(vim.pesc(t.fix_slashes(fn.stdpath('config')))) ) end) |