summaryrefslogtreecommitdiff
path: root/test/fixtures
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-12-04 03:35:54 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2012-12-04 08:12:12 +0100
commit1f76a2eddc3561ff2c434d491e0d2b893c374cfd (patch)
treec2658e1e22c1755908164d03f4c806b251249be4 /test/fixtures
parenta80434736bce22a9ac00376bb5786806752ef3dd (diff)
downloadnode-1f76a2eddc3561ff2c434d491e0d2b893c374cfd.tar.gz
fs: add long stacktrace debugging facility
Enable long stacktraces if NODE_DEBUG=fs is set in the environment. Only applies to the default rethrow callback; it's to help you find places where you forgot to pass in a callback.
Diffstat (limited to 'test/fixtures')
-rw-r--r--test/fixtures/test-fs-readfile-error.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/fixtures/test-fs-readfile-error.js b/test/fixtures/test-fs-readfile-error.js
new file mode 100644
index 000000000..3f8d9a731
--- /dev/null
+++ b/test/fixtures/test-fs-readfile-error.js
@@ -0,0 +1,22 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+require('fs').readFile('/'); // throws EISDIR