Skip to content

Commit

Permalink
test: skip quotes-in-filename test on Windows
Browse files Browse the repository at this point in the history
Windows doesn't support having quotes inside a filename, so we need to
skip this test.

Issue #7
  • Loading branch information
nfischer committed Mar 17, 2018
1 parent f67126b commit f17e49d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,18 @@ describe('proxy', () => {
});

it('escapes quotes', (done) => {
const fquote = 'thisHas"Quotes.txt';
shell.exec('echo hello world').to(fquote);
fs.existsSync(fquote).should.equal(true);
shell[delVarName](fquote);
fs.existsSync(fquote).should.equal(false);
done();
if (unix()) {
const fquote = 'thisHas"Quotes.txt';
shell.exec('echo hello world').to(fquote);
fs.existsSync(fquote).should.equal(true);
shell[delVarName](fquote);
fs.existsSync(fquote).should.equal(false);
done();
} else {
// Windows doesn't support `"` as a character in a filename, see
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
console.log('skipping test');
}
});
});
});

0 comments on commit f17e49d

Please sign in to comment.