From c48b2a98d82904eaacbac32dde6de5ca9f9a51e7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 1 Aug 2011 11:58:56 -0700 Subject: [PATCH] windows: Fix test-module-load-list --- test/simple/test-module-load-list.js | 44 +++++++++++++++++++--------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/test/simple/test-module-load-list.js b/test/simple/test-module-load-list.js index bf6217ff45..513bb68ad4 100644 --- a/test/simple/test-module-load-list.js +++ b/test/simple/test-module-load-list.js @@ -57,8 +57,10 @@ checkExpected(); // Now do the test again after we console.log something. console.log("load console.log"); +console.error("load console.error"); if (!process.features.uv) { + // legacy expected = expected.concat([ 'NativeModule console', 'NativeModule net_legacy', @@ -69,23 +71,37 @@ if (!process.features.uv) { 'NativeModule freelist', 'Binding io_watcher', 'NativeModule tty', - 'NativeModule tty_posix', // FIXME branch on win32 here. + 'NativeModule tty_posix', + 'NativeModule readline' ]); } else { - expected = expected.concat([ - 'NativeModule console', - 'NativeModule net_legacy', - 'NativeModule timers_uv', - 'Binding timer_wrap', - 'NativeModule _linklist', - 'Binding net', - 'NativeModule freelist', - 'Binding io_watcher', - 'NativeModule tty', - 'NativeModule tty_posix' - ]); + if (process.platform == 'win32') { + // win32 + expected = expected.concat([ + 'NativeModule console', + 'NativeModule tty', + 'NativeModule tty_win32', + 'NativeModule readline' + ]); + } else { + // unix libuv backend. + expected = expected.concat([ + 'NativeModule console', + 'NativeModule net_legacy', + 'NativeModule timers_uv', + 'Binding timer_wrap', + 'NativeModule _linklist', + 'Binding net', + 'NativeModule freelist', + 'Binding io_watcher', + 'NativeModule tty', + 'NativeModule tty_posix', + 'NativeModule readline' + ]); + } } +console.error(process.moduleLoadList) + checkExpected(); -console.log(process.moduleLoadList);