Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge nodejs/master
Browse files Browse the repository at this point in the history
Merge 75bf8a9 as of 2017-07-29.
This is an automatically created merge. For any problems please
contact @kunalspathak.

Conflicts:
	test/parallel/test-repl.js
  • Loading branch information
kfarnung committed Jul 31, 2017
2 parents 3fe3388 + 75bf8a9 commit 9d9aa93
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 58 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ lib/internal/v8_prof_polyfill.js
lib/punycode.js
test/addons/??_*/
test/fixtures
test/disabled
test/tmp*/
tools/eslint
tools/icu
Expand Down
3 changes: 2 additions & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ function REPLServer(prompt,
// Check to see if a REPL keyword was used. If it returns true,
// display next prompt and return.
if (trimmedCmd) {
if (trimmedCmd.charAt(0) === '.' && isNaN(parseFloat(trimmedCmd))) {
if (trimmedCmd.charAt(0) === '.' && trimmedCmd.charAt(1) !== '.' &&
isNaN(parseFloat(trimmedCmd))) {
const matches = trimmedCmd.match(/^\.([^\s]+)\s*(.*)$/);
const keyword = matches && matches[1];
const rest = matches && matches[2];
Expand Down
1 change: 0 additions & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ On how to run tests in this directory, see
|cctest |Yes |C++ test that is run as part of the build process.|
|common | |Common modules shared among many tests. [Documentation](./common/README.md)|
|debugger |No |Tests for [debugger](https://nodejs.org/api/debugger.html)functionality along with some tests that require an addon to function properly.|
|disabled |No |Tests that have been disabled from running for various reasons.|
|fixtures | |Test fixtures used in various tests throughout the test suite.|
|gc |No |Tests for garbage collection related functionality.|
|inspector |Yes |Tests for the V8 inspector integration.|
Expand Down
4 changes: 1 addition & 3 deletions test/cctest/test_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ TEST_F(EnvironmentTest, AtExitWithArgument) {
EXPECT_EQ(arg, cb_1_arg);
}

/*
TEST_F(EnvironmentTest, MultipleEnvironmentsPerIsolate) {
TEST_F(EnvironmentTest, DISABLED_MultipleEnvironmentsPerIsolate) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
Env env1 {handle_scope, isolate_, argv};
Expand All @@ -101,7 +100,6 @@ TEST_F(EnvironmentTest, MultipleEnvironmentsPerIsolate) {
RunAtExit(*env2);
EXPECT_TRUE(called_cb_2);
}
*/

static void at_exit_callback1(void* arg) {
called_cb_1 = true;
Expand Down
48 changes: 0 additions & 48 deletions test/disabled/test-https-loop-to-google.js

This file was deleted.

11 changes: 9 additions & 2 deletions test/inspector/inspector-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,15 @@ function parseWSFrame(buffer, handler) {
}
if (buffer.length < bodyOffset + dataLen)
return 0;
const message = JSON.parse(
buffer.slice(bodyOffset, bodyOffset + dataLen).toString('utf8'));
const jsonPayload =
buffer.slice(bodyOffset, bodyOffset + dataLen).toString('utf8');
let message;
try {
message = JSON.parse(jsonPayload);
} catch (e) {
console.error(`JSON.parse() failed for: ${jsonPayload}`);
throw e;
}
if (DEBUG)
console.log('[received]', JSON.stringify(message));
handler(message);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-dh-leak.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Flags: --expose-gc --nocrankshaft --noconcurrent_recompilation
// Flags: --expose-gc --noconcurrent_recompilation
'use strict';

const common = require('../common');
Expand Down
8 changes: 7 additions & 1 deletion test/parallel/test-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,13 @@ function error_test() {
expect: `${prompt_multiline}'foo \\n'\n${prompt_unix}` },
// Whitespace is not evaluated.
{ client: client_unix, send: ' \t \n',
expect: prompt_unix }
expect: prompt_unix },
// Do not parse `...[]` as a REPL keyword
{ client: client_unix, send: '...[]\n',
expect: `${prompt_multiline}` },
// bring back the repl to prompt
{ client: client_unix, send: '.break',
expect: `${prompt_unix}` }
].filter((v) => !common.engineSpecificMessage(v)));
}

Expand Down

0 comments on commit 9d9aa93

Please sign in to comment.