diff options
author | Daniel Ennis <aikar@aikar.co> | 2011-01-24 20:52:38 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-01-24 21:33:30 -0800 |
commit | 52f93185c783beb71535f59e478fcac8912d0c54 (patch) | |
tree | e47be75c1234827e57c07d3208654f7701602403 /test/fixtures | |
parent | 4c5e570706c6e2a0fa2a6dbeef54553b8da07b6c (diff) | |
download | node-new-52f93185c783beb71535f59e478fcac8912d0c54.tar.gz |
Adding support for require-like initialization of node,
so `node foo`
will load one of:
./foo.js
./foo.node
./foo/index.js
./foo/index.node
Test cases added.
Ensured no conflict with native names.
Diffstat (limited to 'test/fixtures')
-rw-r--r-- | test/fixtures/test-init-index/index.js | 3 | ||||
-rw-r--r-- | test/fixtures/test-init-native/fs.js | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/fixtures/test-init-index/index.js b/test/fixtures/test-init-index/index.js new file mode 100644 index 0000000000..1531994d80 --- /dev/null +++ b/test/fixtures/test-init-index/index.js @@ -0,0 +1,3 @@ +(function() { + require('util').print('Loaded successfully!'); +})();
\ No newline at end of file diff --git a/test/fixtures/test-init-native/fs.js b/test/fixtures/test-init-native/fs.js new file mode 100644 index 0000000000..512a18ef41 --- /dev/null +++ b/test/fixtures/test-init-native/fs.js @@ -0,0 +1,6 @@ +(function() { + var fs = require('fs'); + if (fs.readFile) { + require('util').print('fs loaded successfully'); + } +})();
\ No newline at end of file |