From 7335a4234aa9521954333526bff7f996f1df4d1e Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Fri, 4 Nov 2011 17:48:24 -0700 Subject: [PATCH] fix test-module-loading on windows --- test/simple/test-module-loading.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/simple/test-module-loading.js b/test/simple/test-module-loading.js index ce9e296af1..fd6735f229 100644 --- a/test/simple/test-module-loading.js +++ b/test/simple/test-module-loading.js @@ -176,7 +176,7 @@ try { require(loadOrder + 'file3'); } catch (e) { // Not a real .node module, but we know we require'd the right thing. - assert.ok(e.message.match(/file3\.node/)); + assert.ok(e.message.replace(/\\/g, '/').match(/file3\.node/)); } assert.equal(require(loadOrder + 'file4').file4, 'file4.reg', msg); assert.equal(require(loadOrder + 'file5').file5, 'file5.reg2', msg); @@ -184,7 +184,7 @@ assert.equal(require(loadOrder + 'file6').file6, 'file6/index.js', msg); try { require(loadOrder + 'file7'); } catch (e) { - assert.ok(e.message.match(/file7\/index\.node/)); + assert.ok(e.message.replace(/\\/g, '/').match(/file7\/index\.node/)); } assert.equal(require(loadOrder + 'file8').file8, 'file8/index.reg', msg); assert.equal(require(loadOrder + 'file9').file9, 'file9/index.reg2', msg);