From 1e98d90db87fae1b5ebd9f51453ad593ae0034f9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 29 Oct 2015 13:39:56 +0100 Subject: [PATCH] test: add regression test for --debug-brk -e 0 Check that `node --debug-brk -e 0` immediately quits. PR-URL: https://github.com/nodejs/node/pull/3585 Reviewed-By: Evan Lucas Reviewed-By: James M Snell --- test/parallel/test-debug-brk.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/parallel/test-debug-brk.js diff --git a/test/parallel/test-debug-brk.js b/test/parallel/test-debug-brk.js new file mode 100644 index 00000000000000..49b19898e030b9 --- /dev/null +++ b/test/parallel/test-debug-brk.js @@ -0,0 +1,9 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const spawnSync = require('child_process').spawnSync; + +const args = [`--debug-brk=${common.PORT}`, `-e`, `0`]; +const proc = spawnSync(process.execPath, args, {encoding: 'utf8'}); +assert(/Debugger listening on/.test(proc.stderr));