diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2011-09-30 01:18:35 +0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-09-30 13:22:56 -0700 |
commit | 360ce526fd5391a955005b27f327bda83acac6dd (patch) | |
tree | 7ddf3dd03873ae0e4b0d9eb7ea18914c116f4583 /test | |
parent | 4e43afd9737f6c2f1b51d8dbfbb2bc42fabc4deb (diff) | |
download | node-new-360ce526fd5391a955005b27f327bda83acac6dd.tar.gz |
debugger: watch, unwatch, watchers
Fixes #1800.
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-debugger-repl.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/test/simple/test-debugger-repl.js b/test/simple/test-debugger-repl.js index 25d3ceeda4..6152fd4f47 100644 --- a/test/simple/test-debugger-repl.js +++ b/test/simple/test-debugger-repl.js @@ -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); + assert.ok(line.match(expectedLine) !== null, expectedLine); if (expected[0].lines.length === 0) { var callback = expected[0].callback; @@ -59,6 +59,15 @@ function addTest(input, output) { function next() { if (expected.length > 0) { child.stdin.write(expected[0].input + '\n'); + + if (!expected[0].lines) { + process.nextTick(function() { + var callback = expected[0].callback; + expected.shift(); + + callback && callback(); + }); + } } else { finish(); } @@ -80,12 +89,26 @@ addTest('n', [ /11/, /12/, /13/, /14/, /15/ ]); +// Watch +addTest('watch("\'x\'")'); + // Continue addTest('c', [ /break in .*:7/, + /Watchers/, + /0:\s+'x' = "x"/, + /()/, /5/, /6/, /7/, /8/, /9/ ]); +// Show watchers +addTest('watchers', [ + /0:\s+'x' = "x"/ +]); + +// Unwatch +addTest('unwatch("\'x\'")'); + // Step out addTest('o', [ /break in .*:14/, |