GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/test/sequential/test-debugger-repeat-last.js at main · ide/node Expand file tree/ Copy pathtest-debugger-repeat-last.jsMore file actions 45 lines (38 loc) · 1.13 KB / Copy pathtest-debugger-repeat-last.jsFile metadata and controls45 lines (38 loc) · 1.13 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 '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); }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |