Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: refactor test-repl-sigint #11309

Closed
wants to merge 1 commit into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented Feb 11, 2017

  • remove debugging code that prints child stdout
  • indexOf() -> includes()
  • improved messages on assertion failures
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test repl

* remove debugging code that prints child stdout
* indexOf() -> includes()
* improved messages on assertion failures
@Trott Trott added repl Issues and PRs related to the REPL subsystem. test Issues and PRs related to the tests. labels Feb 11, 2017
Copy link
Contributor

@thefourtheye thefourtheye left a comment

Choose a reason for hiding this comment

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

LGTM if CI is happy.

assert.notStrictEqual(stdout.indexOf('42042\n'), -1);
assert.ok(
stdout.includes('Script execution interrupted.\n'),
`Expected stdout to contain "Script execution interrupted.", got ${stdout}`
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: \n is missing in the expected string.

Copy link
Member Author

Choose a reason for hiding this comment

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

I left it out because a literal \n in the message output would probably be unhelpful and an escaped \n might be taken to mean that an escaped \n is what is expected.

I'm OK with any of the three possibilities (leave it out, put it in literally, put it in escaped). I chose this one (leave it out) for simplicity. If you feel that it should be there, let me know if you want it escaped or not. And if, like me, you don't feel particularly strongly, then I'll probably just leave it as it is. ¯\(ツ)

@Trott
Copy link
Member Author

Trott commented Feb 13, 2017

jasnell pushed a commit that referenced this pull request Feb 13, 2017
* remove debugging code that prints child stdout
* indexOf() -> includes()
* improved messages on assertion failures

PR-URL: #11309
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@jasnell
Copy link
Member

jasnell commented Feb 13, 2017

Landed in f2023d7

@jasnell jasnell closed this Feb 13, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 14, 2017
* remove debugging code that prints child stdout
* indexOf() -> includes()
* improved messages on assertion failures

PR-URL: nodejs#11309
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
jasnell pushed a commit that referenced this pull request Mar 7, 2017
* remove debugging code that prints child stdout
* indexOf() -> includes()
* improved messages on assertion failures

PR-URL: #11309
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@jasnell
Copy link
Member

jasnell commented Mar 7, 2017

Needs a backport PR to land on v4

MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* remove debugging code that prints child stdout
* indexOf() -> includes()
* improved messages on assertion failures

PR-URL: #11309
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
@Trott Trott deleted the repl-sigint branch January 13, 2022 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants