From 0216a3a3d9920be1c65aa1ed90b0548b04a99d05 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 22:21:51 -0500 Subject: [PATCH 10/23] Fix incorrect test assumptions for MinGW --- test/parallel/test-debugger-pid.js | 3 ++- test/parallel/test-fs-symlink.js | 5 ++++- test/parallel/test-https-foafssl.js | 6 +++++- test/parallel/test-npm-install.js | 5 +++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-debugger-pid.js b/test/parallel/test-debugger-pid.js index e11d2315..857e6be7 100644 --- a/test/parallel/test-debugger-pid.js +++ b/test/parallel/test-debugger-pid.js @@ -11,8 +11,9 @@ const interfacer = spawn(process.execPath, ['debug', '-p', '655555']); interfacer.stdout.setEncoding('utf-8'); interfacer.stderr.setEncoding('utf-8'); +const newline = common.isMinGW ? '\r\n' : '\n'; const onData = (data) => { - data = (buffer + data).split('\n'); + data = (buffer + data).split(newline); buffer = data.pop(); data.forEach(function(line) { interfacer.emit('line', line); diff --git a/test/parallel/test-fs-symlink.js b/test/parallel/test-fs-symlink.js index 1de75320..26577365 100644 --- a/test/parallel/test-fs-symlink.js +++ b/test/parallel/test-fs-symlink.js @@ -32,7 +32,10 @@ const fs = require('fs'); let linkTime; let fileTime; -common.refreshTmpDir(); +if (common.isMinGW) { + common.skip('MinGW does not support symlinks'); + return; +} // test creating and reading symbolic link const linkData = fixtures.path('/cycles/root.js'); diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 4e1a8fbc..6cf6deca 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -81,7 +81,11 @@ server.listen(0, function() { server.close(); }); - client.stdin.write('GET /\n\n'); + if (common.isMinGW) { + client.stdin.write('GET /\r\n\r\n'); + } else { + client.stdin.write('GET /\n\n'); + } client.on('error', function(error) { throw error; diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js index d826eb09..be4084f2 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -9,6 +9,11 @@ const assert = require('assert'); const fs = require('fs'); const fixtures = require('../common/fixtures'); +if(common.isMinGW) { + common.skip('npm is split into its own package'); + return; +} + common.refreshTmpDir(); const npmSandbox = path.join(common.tmpDir, 'npm-sandbox'); fs.mkdirSync(npmSandbox); -- 2.17.0.windows.1