summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2011-11-04 22:20:53 +0600
committerBert Belder <bertbelder@gmail.com>2011-11-04 17:50:46 +0100
commitb5d32d4a9ecc76ccb5291badf5e9d91dbfc9fda4 (patch)
treee9758a8d146bc838fac4f5be12d479a2c59f2d37 /test
parent829735e738d34d880ba35c0e114cf9cff4dfedaf (diff)
downloadnodejs-b5d32d4a9ecc76ccb5291badf5e9d91dbfc9fda4.tar.gz
nodejs-b5d32d4a9ecc76ccb5291badf5e9d91dbfc9fda4.tar.bz2
nodejs-b5d32d4a9ecc76ccb5291badf5e9d91dbfc9fda4.zip
debugger: do not request `continue` on connection
* Updated test * Use `node debug file`, not `node debug -e "..."` in test
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/breakpoints.js2
-rw-r--r--test/simple/test-debugger-repl.js28
2 files changed, 14 insertions, 16 deletions
diff --git a/test/fixtures/breakpoints.js b/test/fixtures/breakpoints.js
index c22a56067..8445558df 100644
--- a/test/fixtures/breakpoints.js
+++ b/test/fixtures/breakpoints.js
@@ -1,5 +1,3 @@
-// wrapper line
-debugger;
debugger;
function a(x) {
var i = 10;
diff --git a/test/simple/test-debugger-repl.js b/test/simple/test-debugger-repl.js
index 500f17952..1bb03a364 100644
--- a/test/simple/test-debugger-repl.js
+++ b/test/simple/test-debugger-repl.js
@@ -25,9 +25,9 @@ var assert = require('assert');
var spawn = require('child_process').spawn;
var debug = require('_debugger');
-var code = require('fs').readFileSync(common.fixturesDir + '/breakpoints.js');
+var script = common.fixturesDir + '/breakpoints.js';
-var child = spawn(process.execPath, ['debug', '-e', code]);
+var child = spawn(process.execPath, ['debug', script]);
var buffer = '';
child.stdout.setEncoding('utf-8');
@@ -46,7 +46,7 @@ child.on('line', function(line) {
assert.ok(expected.length > 0, 'Got unexpected line: ' + line);
var expectedLine = expected[0].lines.shift();
- assert.ok(line.match(expectedLine) !== null, expectedLine);
+ assert.ok(line.match(expectedLine) !== null, line + ' != ' + expectedLine);
if (expected[0].lines.length === 0) {
var callback = expected[0].callback;
@@ -79,14 +79,14 @@ function addTest(input, output) {
addTest(null, [
/listening on port 5858/,
/connecting... ok/,
- /break in .*:3/,
- /1/, /2/, /3/, /4/, /5/
+ /break in .*:1/,
+ /1/, /2/, /3/
]);
// Next
addTest('n', [
- /break in .*:13/,
- /11/, /12/, /13/, /14/, /15/
+ /break in .*:11/,
+ /9/, /10/, /11/, /12/, /13/
]);
// Watch
@@ -94,11 +94,11 @@ addTest('watch("\'x\'")');
// Continue
addTest('c', [
- /break in .*:7/,
+ /break in .*:5/,
/Watchers/,
/0:\s+'x' = "x"/,
/()/,
- /5/, /6/, /7/, /8/, /9/
+ /3/, /4/, /5/, /6/, /7/
]);
// Show watchers
@@ -111,19 +111,19 @@ addTest('unwatch("\'x\'")');
// Step out
addTest('o', [
- /break in .*:14/,
- /12/, /13/, /14/, /15/, /16/
+ /break in .*:12/,
+ /10/, /11/, /12/, /13/, /14/
]);
// Continue
addTest('c', [
- /break in .*:7/,
- /5/, /6/, /7/, /8/, /9/
+ /break in .*:5/,
+ /3/, /4/, /5/, /6/, /7/
]);
// Set breakpoint by function name
addTest('sb("setInterval()", "!(setInterval.flag++)")', [
- /2/, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/, /11/, /12/
+ /1/, /2/, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/
]);
// Continue