Skip to content

Commit 4825ebe

Browse files
committed
test: preselecting a file with spaces in the path
1 parent 10780cd commit 4825ebe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

integration-tests/cypress/e2e/opening-files.cy.ts

+14
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ describe("opening files", () => {
7272
"match",
7373
new RegExp("dir with spaces/file2.txt" satisfies MyTestDirectoryFile),
7474
)
75+
76+
// add text that contains a filename delimited with spaces to test that
77+
// extra spaces are ignored
78+
nvim.runLuaCode({
79+
luaCode: `vim.api.nvim_buf_set_lines(0, 0, -1, false, {" ./dir with spaces/file2.txt "})`,
80+
})
81+
cy.typeIntoTerminal(
82+
// this time select the entire line, including the spaces
83+
"V",
84+
)
85+
getSelectedFilePath().should(
86+
"match",
87+
new RegExp("dir with spaces/file2.txt" satisfies MyTestDirectoryFile),
88+
)
7589
})
7690
})
7791

0 commit comments

Comments
 (0)