In preparation for a lint rule that disallows empty lines at the end of
a file, remove such lines from a number of test files.
Refs: https://github.com/nodejs/node/issues/8918
PR-URL: https://github.com/nodejs/node/pull/8920
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The `test/common` module has the capability to identify if any variable
is leaked to the global scope and fail the test. So that has to be
imported at the beginning.
PR-URL: https://github.com/nodejs/node/pull/7786
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.
PR-URL: https://github.com/nodejs/node/pull/6793
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Move test from `test/debugger` to `test/sequential` so that it is
exercised by CI and `make test`.
PR-URL: https://github.com/nodejs/node/pull/6731
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The line number checks in test-debugger-repl-break-in-module were
checking for line numbers that exceed the total number of lines in the
files that were being inspected. Change the checks to match the actual
files.
PR-URL: https://github.com/nodejs/node/pull/6686
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
The current format that prints the process PID before the actual
message.
Adapt the test so it also passes on Windows, that emits a different
message from the rest of platforms.
Move the test to parallel.
PR-URL: https://github.com/nodejs/node/pull/6584
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit allows all array properties to be printed except for
"length". Previously, this filter was applied by checking the
type of each property. However, something changed in V8, and
array elements started coming through as numeric strings, which
stopped them from being displayed.
Fixes: https://github.com/nodejs/node/issues/6444
PR-URL: https://github.com/nodejs/node/pull/6448
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Fix long-broken test-debugger-client by adding missing `\r\n\r\n`
separator.
PR-URL: https://github.com/nodejs/node/pull/5851
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Remove unused vars in tests
PR-URL: https://github.com/nodejs/node/pull/4536
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.
R-URL: https://github.com/nodejs/node/pull/1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
common.js contains code that detects leaked variables.
In preparation for an eslint rule that will enforce loading common.js in
test files, load it everywhere it can be loaded and use an
`eslint-disable` comment for files that intentionally leak.
PR-URL: https://github.com/nodejs/node/pull/3157
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
When using `iojs debug -p <pid>` with an invalid pid, the debugger
printed an internal error message because it wasn't smart enough
to figure out that the target process didn't exist. Now it is.
PR-URL: https://github.com/nodejs/io.js/pull/1863
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.
test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.
PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
When debug in remote mode with host:port or pid, the interface
spawn child process also. If the debugger agent is running, will
get following output:
```
< Error: listen EADDRINUSE :::5858
< at Object.exports._errnoException (util.js:734:11)
< at exports._exceptionWithHostPort (util.js:757:20)
< at Agent.Server._listen2 (net.js:1155:14)
< at listen (net.js:1181:10)
< at Agent.Server.listen (net.js:1268:5)
< at Object.start (_debug_agent.js:21:9)
< at startup (node.js:68:9)
< at node.js:799:3
```
This fix won't spawn child process and no more error message was
shown.
When use `iojs debug`, the tip information just like this:
```
Usage: iojs debug script.js
```
This fix will display the advance usage also:
```
Usage: iojs debug script.js
iojs debug <host>:<port>
iojs debug -p <pid>
```
Fixes: https://github.com/iojs/io.js/issues/889
PR-URL: https://github.com/iojs/io.js/pull/1282
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The copyright and license notice is already in the LICENSE file. There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
We now wait to connect to the debuggee until we know that
its error stream has data, to ensure that the output message
"connecting..... ok" appears after "Debugger listening on port xyz"
I also increased the test timeout to let the more complex
tests finish in time on Windows
This change fixes the following unit tests on Windows:
test-debugger-repl.js
test-debugger-repl-term.js
test-debugger-repl-utf8.js
test-debugger-repl-restart.js