added test-require-json.js, patched with nashorn error message content

This commit is contained in:
Jean-Francois 2014-01-09 11:54:02 +01:00
parent b96d70c513
commit e66ec522ca
3 changed files with 14 additions and 0 deletions

View File

@ -317,6 +317,7 @@
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-pipe-head.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-pipe-unref.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-readline-interface.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-require-json.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-repl.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-script-context.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-setproctitle.js"/>
@ -413,6 +414,7 @@
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-pipe-head.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-pipe-unref.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-readline-interface.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-require-json.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-repl.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-script-context.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-setproctitle.js"/>

View File

@ -0,0 +1,11 @@
--- ../node/test/simple/test-require-json.js 2013-08-22 13:48:54.000000000 +0200
+++ test/simple/test-require-json.js 2014-01-09 11:26:14.000000000 +0100
@@ -24,7 +24,7 @@
try {
require('../fixtures/invalid.json');
} catch (err) {
- var re = /test[\/\\]fixtures[\/\\]invalid.json: Unexpected string/;
+ var re = /test[\/\\]fixtures[\/\\]invalid.json: Invalid JSON:/;
var i = err.message.match(re);
assert(null !== i, 'require() json error should include path');
}

View File

@ -507,6 +507,7 @@ source.test.simple.list = \
test-require-cache-without-stat.js \
test-require-exceptions.js \
test-require-resolve.js \
test-require-json.js \
test-script-context.js \
test-script-new.js \
test-script-static-context.js \