Skip to content

Commit

Permalink
Test whitespace protection for relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickjuchli committed Dec 19, 2023
1 parent 90f33bc commit e8ff9c7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/commandSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe("Simple commands", function() {
})
})

it("can handle leading whitespace in paths", () => {
it("can handle leading whitespace in a filename", () => {
this.server.addHandlers({
"pwd": () => `257 "/this/that"`
})
Expand All @@ -121,6 +121,15 @@ describe("Simple commands", function() {
})
})

it("can handle leading whitespace in relative path", () => {
this.server.addHandlers({
"pwd": () => `257 "/this/that"`
})
return this.client.protectWhitespace(" a/b").then(result => {
assert.strictEqual(result, "/this/that/ a/b")
})
})

it("can remove a file")
it("can change directory")
it("can get the current working directory")
Expand Down

0 comments on commit e8ff9c7

Please sign in to comment.