summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDenys Zariaiev <denys.zariaiev@gmail.com>2014-04-25 15:06:06 +0300
committerFedor Indutny <fedor@indutny.com>2014-04-26 00:34:55 +0400
commit681fe599d7a45fb537f948c08e64cdce06bc585d (patch)
tree1b115ad38a9f96bdc1d50b4fac28480495228e44 /test
parentbd24ab2bd788a196adaac316db20cde2c8c8e14d (diff)
downloadandroid-node-v8-681fe599d7a45fb537f948c08e64cdce06bc585d.tar.gz
android-node-v8-681fe599d7a45fb537f948c08e64cdce06bc585d.tar.bz2
android-node-v8-681fe599d7a45fb537f948c08e64cdce06bc585d.zip
vm: assign Environment to created context
ContextifyContext::CreateV8Context is now create context with Environment pointer Signed-off-by: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'test')
-rw-r--r--test/simple/test-regress-GH-7511.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/simple/test-regress-GH-7511.js b/test/simple/test-regress-GH-7511.js
new file mode 100644
index 0000000000..9694f0499e
--- /dev/null
+++ b/test/simple/test-regress-GH-7511.js
@@ -0,0 +1,30 @@
+// 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.
+
+var common = require('../common'),
+ assert = require('assert'),
+ vm = require('vm');
+
+assert.doesNotThrow(function() {
+ var context = vm.createContext({ process: process });
+ var result = vm.runInContext('process.env["PATH"]', context);
+ assert.notEqual(undefined, result);
+});