%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const common = require('../common'); const child_process = require('child_process'); const assert = require('assert'); if (process.env.NODE_PENDING_DEPRECATION) common.skip('test does not work when NODE_PENDING_DEPRECATION is set'); function test(main, callSite, expected) { const { stderr } = child_process.spawnSync(process.execPath, ['-p', ` process.mainModule = { filename: ${JSON.stringify(main)} }; vm.runInNewContext('new Buffer(10)', { Buffer }, { filename: ${JSON.stringify(callSite)} });`], { encoding: 'utf8' }); if (expected) assert(stderr.includes('[DEP0005] DeprecationWarning'), stderr); else assert.strictEqual(stderr.trim(), ''); } test('/a/node_modules/b.js', '/a/node_modules/x.js', false); test('/a/node_modules/b.js', '/a/node_modules/foo/node_modules/x.js', false); test('/a/node_modules/foo/node_modules/b.js', '/a/node_modules/x.js', false); test('/node_modules/foo/b.js', '/node_modules/foo/node_modules/x.js', false); test('/a.js', '/b.js', true); test('/a.js', '/node_modules/b.js', false); test('/node_modules/a.js.js', '/b.js', true); test('c:\\a\\node_modules\\b.js', 'c:\\a\\node_modules\\x.js', false); test('c:\\a\\node_modules\\b.js', 'c:\\a\\node_modules\\foo\\node_modules\\x.js', false); test('c:\\node_modules\\foo\\b.js', 'c:\\node_modules\\foo\\node_modules\\x.js', false); test('c:\\a.js', 'c:\\b.js', true); test('c:\\a.js', 'c:\\node_modules\\b.js', false); test('c:\\node_modules\\a.js', 'c:\\b.js', true);