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

repl,test: no test coverage for repl.start({ eval: fn }) #3544

Closed
bnoordhuis opened this issue Oct 27, 2015 · 8 comments
Closed

repl,test: no test coverage for repl.start({ eval: fn }) #3544

bnoordhuis opened this issue Oct 27, 2015 · 8 comments
Labels
repl Issues and PRs related to the REPL subsystem. test Issues and PRs related to the tests.

Comments

@bnoordhuis
Copy link
Member

It looks like we have no test coverage for the eval option to repl.start(). This should be remedied.

The only test I can find that passes eval is test/parallel/test-repl-options.js but it doesn't exercise its functionality, the callback is just a stub.

@bnoordhuis bnoordhuis added repl Issues and PRs related to the REPL subsystem. test Issues and PRs related to the tests. labels Oct 27, 2015
@bnoordhuis
Copy link
Member Author

On tab completion - eval will be called with .scope as an input string.

I can't make this work, cmd is never '.scope'.

@Fishrock123
Copy link
Contributor

I think it originated in aad12d0

@bnoordhuis
Copy link
Member Author

/cc @TooTallNate in that case.

@kapouer
Copy link
Contributor

kapouer commented Nov 9, 2015

@bnoordhuis

var pr = repl.start({eval: ...});
pr.context = {};

eval will be called with .scope command when the user hits tab on a simple expression without dot (including an empty line).

Trott added a commit to Trott/io.js that referenced this issue Feb 11, 2016
@Trott
Copy link
Member

Trott commented Feb 11, 2016

I've added a minimal test at #5192.

I too am unable to get the repl to fire the eval function on tab completion. ??? Assuming I'm not just Doing It Wrong, there should probably be a separate issue filed for that.

@MylesBorins
Copy link
Contributor

@Trott thoughts on LTS?

@Trott
Copy link
Member

Trott commented Feb 12, 2016

I'd say yes, add to LTS.

@bnoordhuis
Copy link
Member Author

I too am unable to get the repl to fire the eval function on tab completion. ??? Assuming I'm not just Doing It Wrong, there should probably be a separate issue filed for that.

Filed #5232 for that.

rvagg pushed a commit that referenced this issue Feb 15, 2016
Fixes: #3544
PR-URL: #5192
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Feb 18, 2016
Fixes: #3544
PR-URL: #5192
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Feb 18, 2016
Fixes: #3544
PR-URL: #5192
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
stefanmb pushed a commit to stefanmb/node that referenced this issue Feb 23, 2016
Fixes: nodejs#3544
PR-URL: nodejs#5192
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Mar 2, 2016
Fixes: #3544
PR-URL: #5192
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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

No branches or pull requests

5 participants