From f17e49d51e467ebaca57355b26300e36af41ff6a Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Sat, 17 Mar 2018 02:09:19 -0700 Subject: [PATCH] test: skip quotes-in-filename test on Windows Windows doesn't support having quotes inside a filename, so we need to skip this test. Issue #7 --- test/test.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/test.js b/test/test.js index 6b4ee8a..0e8c360 100644 --- a/test/test.js +++ b/test/test.js @@ -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'); + } }); }); });