���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /home/real/node-v13.0.1/test/sequential/ |
'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); const path = require('../common/fixtures').path; const spawn = require('child_process').spawn; const assert = require('assert'); const fixture = path('debugger-repeat-last.js'); const args = [ 'inspect', `--port=${common.PORT}`, fixture ]; const proc = spawn(process.execPath, args, { stdio: 'pipe' }); proc.stdout.setEncoding('utf8'); let stdout = ''; let sentCommand = false; let sentExit = false; proc.stdout.on('data', (data) => { stdout += data; // Send 'n' as the first step. if (!sentCommand && stdout.includes('> 1 ')) { setImmediate(() => { proc.stdin.write('n\n'); }); return sentCommand = true; } // Send empty (repeat last command) until we reach line 5. if (sentCommand && !stdout.includes('> 5')) { setImmediate(() => { proc.stdin.write('\n'); }); return true; } if (!sentExit && stdout.includes('> 5')) { setTimeout(() => { proc.stdin.write('\n\n\n.exit\n\n\n'); }, 1); return sentExit = true; } }); process.on('exit', (exitCode) => { assert.strictEqual(exitCode, 0); console.log(stdout); });