mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
384 B
12 lines
384 B
9 years ago
|
'use strict';
|
||
|
// Refs: https://github.com/nodejs/node/issues/548
|
||
|
require('../common');
|
||
|
const assert = require('assert');
|
||
|
const vm = require('vm');
|
||
|
const context = vm.createContext();
|
||
|
|
||
|
vm.runInContext('function test() { return 0; }', context);
|
||
|
vm.runInContext('function test() { return 1; }', context);
|
||
|
const result = vm.runInContext('test()', context);
|
||
|
assert.strictEqual(result, 1);
|