projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebefe77
)
Add test cases for #1944.
author
Nathan Rajlich
<nathan@tootallnate.net>
Wed, 26 Oct 2011 19:45:51 +0000
(12:45 -0700)
committer
koichik
<koichik@improvement.jp>
Wed, 26 Oct 2011 19:58:51 +0000
(
04:58
+0900)
test/simple/test-util-inspect.js
patch
|
blob
|
history
diff --git
a/test/simple/test-util-inspect.js
b/test/simple/test-util-inspect.js
index 8c98ed21c05d5cd5e3e78058afd3ec9cbd513371..a2912f762c13ef61af3358fed4ba37f363ffb12d 100644
(file)
--- a/
test/simple/test-util-inspect.js
+++ b/
test/simple/test-util-inspect.js
@@
-62,3
+62,16
@@
assert.ok(ex.indexOf('[type]') != -1);
// GH-1941
// should not throw:
assert.equal(util.inspect(Object.create(Date.prototype)), '{}')
+
+// GH-1944
+assert.doesNotThrow(function () {
+ var d = new Date();
+ d.toUTCString = null;
+ util.inspect(d);
+});
+
+assert.doesNotThrow(function () {
+ var r = /regexp/;
+ r.toString = null;
+ util.inspect(r);
+});