FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: fix test-cli-node-options on Windows by addaleax · Pull Request #16709 · nodejs/node · GitHub

/ node Public

test: fix test-cli-node-options on Windows - #16709

Closed
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:stl-windows
Closed

test: fix test-cli-node-options on Windows#16709
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:stl-windows

Conversation

addaleax commented Nov 3, 2017

Copy link
Copy Markdown
Member

#16495 broke the Windows build, accounting for \r\n newlines should fix it.

Ref: #16495

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

cli

nodejs#16495 broke the Windows build,
accounting for `\r\n` newlines should fix it.

Ref: nodejs#16495
addaleax added cli Issues and PRs related to the Node.js command line interface. test Issues and PRs related to the tests. labels Nov 3, 2017

addaleax commented Nov 3, 2017

Copy link
Copy Markdown
Member Author

CI: https://ci.nodejs.org/job/node-test-pull-request/11167/

@nodejs/collaborators @apapirovski This should be fast-tracked to unbreak CI

expect('--max-old-space-size=0', 'B\n');
expect('--stack-trace-limit=100',
/(\s*at f \(\[eval\]:1:\d*\)\n){100}/,
/(\s*at f \(\[eval\]:1:\d*\)\r?\n){100}/,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe worth making it a non-capturing group:

-        /(\s*at f \(\[eval\]:1:\d*\)\r?\n){100}/, 
+        /(\s*at f \(?:\[eval\]:1:\d*\)\r?\n){100}/, 

vsemozhetbyt Nov 3, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Or rather

-        /(\s*at f \(\[eval\]:1:\d*\)\r?\n){100}/, 
+        /(?:\s*at f \(\[eval\]:1:\d*\)\r?\n){100}/, 

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Since this is a test file, I’d go with clarity over performance? I know it took me a while to get the hang of what ?: means when learning regexes and seeing that in the wild…

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Interesting, I find not using non-capturing groups more confusing, as for me a group is for capturing (I think using it for capturing is more common than using it to repeat with (){x}).

The reason I suggested it was because my first thought was "why does the test need to capture 100 different groups", and the fact that the regex gets passed through a custom function makes it harder to track. Performance is a secondary concern.

addaleax commented Nov 3, 2017
edited
Loading

Copy link
Copy Markdown
Member Author

Landed in 3d4d5e0 to unbreak CI

Feel free to implement suggestions as separate PRs though :)

addaleax closed this Nov 3, 2017
addaleax deleted the stl-windows branch November 3, 2017 10:47
addaleax added a commit that referenced this pull request Nov 3, 2017
#16495 broke the Windows build,
accounting for `\r\n` newlines should fix it.

Ref: #16495
PR-URL: #16709
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
cjihrig pushed a commit to cjihrig/node that referenced this pull request Nov 6, 2017
nodejs#16495 broke the Windows build,
accounting for `\r\n` newlines should fix it.

Ref: nodejs#16495
PR-URL: nodejs#16709
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
cjihrig mentioned this pull request Nov 6, 2017

gibfahn commented Nov 14, 2017

Copy link
Copy Markdown
Member

Should land with #16495 when that lands.

MylesBorins added the baking-for-lts PRs that need to wait before landing in a LTS release. label Nov 14, 2017
AndreasMadsen mentioned this pull request Jan 16, 2018
4 tasks
gibfahn added land-on-v8.x and removed baking-for-lts PRs that need to wait before landing in a LTS release. lts-watch-v8.x labels Jan 16, 2018
gibfahn pushed a commit to gibfahn/node that referenced this pull request Jan 16, 2018
nodejs#16495 broke the Windows build,
accounting for `\r\n` newlines should fix it.

Ref: nodejs#16495
PR-URL: nodejs#16709
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Issues and PRs related to the Node.js command line interface. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL