diff --git a/test/gitdir_watcher_spec.lua b/test/gitdir_watcher_spec.lua index 93f93ec4..41d48ab2 100644 --- a/test/gitdir_watcher_spec.lua +++ b/test/gitdir_watcher_spec.lua @@ -55,7 +55,7 @@ describe('gitdir_watcher', function() 'attach(1): Attaching (trigger=BufRead)', p"run_job: git .* config user.name", p"run_job: git .* rev%-parse %-%-show%-toplevel %-%-absolute%-git%-dir %-%-abbrev%-ref HEAD", - p('run_job: git .* ls%-files .* '..test_file), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file)), 'watch_gitdir(1): Watching git dir', p'run_job: git .* show :0:dummy.txt', 'update(1): updates: 1, jobs: 6', @@ -70,10 +70,10 @@ describe('gitdir_watcher', function() match_debug_messages { 'watcher_cb(1): Git dir update', p'run_job: git .* rev%-parse %-%-show%-toplevel %-%-absolute%-git%-dir %-%-abbrev%-ref HEAD', - p('run_job: git .* ls%-files .* '..test_file), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file)), p'run_job: git .* diff %-%-name%-status %-C %-%-cached', 'handle_moved(1): File moved to dummy.txt2', - p('run_job: git .* ls%-files .* '..test_file2), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file2)), p'handle_moved%(1%): Renamed buffer 1 from .*/dummy.txt to .*/dummy.txt2', p'run_job: git .* show :0:dummy.txt2', 'update(1): updates: 2, jobs: 11' @@ -88,10 +88,10 @@ describe('gitdir_watcher', function() match_debug_messages { 'watcher_cb(1): Git dir update', p'run_job: git .* rev%-parse %-%-show%-toplevel %-%-absolute%-git%-dir %-%-abbrev%-ref HEAD', - p('run_job: git .* ls%-files .* '..test_file2), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file2)), p'run_job: git .* diff %-%-name%-status %-C %-%-cached', 'handle_moved(1): File moved to dummy.txt3', - p('run_job: git .* ls%-files .* '..test_file3), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file3)), p'handle_moved%(1%): Renamed buffer 1 from .*/dummy.txt2 to .*/dummy.txt3', p'run_job: git .* show :0:dummy.txt3', 'update(1): updates: 3, jobs: 16' @@ -106,11 +106,11 @@ describe('gitdir_watcher', function() match_debug_messages { 'watcher_cb(1): Git dir update', p'run_job: git .* rev%-parse %-%-show%-toplevel %-%-absolute%-git%-dir %-%-abbrev%-ref HEAD', - p('run_job: git .* ls%-files .* '..test_file3), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file3)), p'run_job: git .* diff %-%-name%-status %-C %-%-cached', - p('run_job: git .* ls%-files .* '..test_file), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file)), 'handle_moved(1): Moved file reset', - p('run_job: git .* ls%-files .* '..test_file), + p('run_job: git .* ls%-files .* '..vim.pesc(test_file)), p'handle_moved%(1%): Renamed buffer 1 from .*/dummy.txt3 to .*/dummy.txt', p'run_job: git .* show :0:dummy.txt', 'update(1): updates: 4, jobs: 22' diff --git a/test/gitsigns_spec.lua b/test/gitsigns_spec.lua index b5f22377..5c699bd8 100644 --- a/test/gitsigns_spec.lua +++ b/test/gitsigns_spec.lua @@ -91,7 +91,7 @@ describe('gitsigns', function() 'attach(1): Attaching (trigger=BufRead)', p'run_job: git .* config user.name', p'run_job: git .* rev%-parse %-%-show%-toplevel %-%-absolute%-git%-dir %-%-abbrev%-ref HEAD', - p('run_job: git .* ls%-files %-%-stage %-%-others %-%-exclude%-standard %-%-eol '..test_file), + p('run_job: git .* ls%-files %-%-stage %-%-others %-%-exclude%-standard %-%-eol '..vim.pesc(test_file)), 'watch_gitdir(1): Watching git dir', p'run_job: git .* show :0:dummy.txt', 'update(1): updates: 1, jobs: 7' @@ -201,7 +201,7 @@ describe('gitsigns', function() 'attach(1): Attaching (trigger=BufNewFile)', p'run_job: git .* config user.name', p'run_job: git .* rev%-parse %-%-show%-toplevel %-%-absolute%-git%-dir %-%-abbrev%-ref HEAD', - p('run_job: git .* ls%-files %-%-stage %-%-others %-%-exclude%-standard %-%-eol '..newfile), + p('run_job: git .* ls%-files %-%-stage %-%-others %-%-exclude%-standard %-%-eol '..vim.pesc(newfile)), 'attach(1): Not a file', }