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

Console output for failed tests #33

Open
spookylukey opened this issue Mar 31, 2014 · 2 comments
Open

Console output for failed tests #33

spookylukey opened this issue Mar 31, 2014 · 2 comments

Comments

@spookylukey
Copy link

This seems like a great tool, but lacking a key feature for me:

The normal test runner outputs to the console in a format that can be parsed by IDEs, allowing you to jump right to the line where you have an error (failed assertion or exception). For example, in Emacs:

http://lukeplant.me.uk/uploads/Screenshot_from_2014-03-31_20_29_37.png

If there was an option for cricket to dump the same output stdout when it ran tests (as they failed - not waiting for the end), this would allow it to be a fantastic drop-in replacement for the normal test runner that keeps the best of both worlds.

Thanks!

@freakboy3742
Copy link
Member

Better integration with editors is definitely something I want to look at. I suppose the question is where the line is drawn. My initial though was that the 'parse and hyperlink' function is something that should be handled on the Cricket side, and given as a directive to the editor to open in a particular location.

Your suggestion seems to be more along the line of "give the whole trace to Emacs, and let Emacs handle the hyperlink". While Emacs is obviously a big player in this space, I'm wary of introducing a feature that would only be useful to Emacs (if only because I don't use Emacs myself :-) That said, I obviously don't want to lock out Emacs users.

I know this is available as a command line option for a bunch of editors (e.g., Sublime Text allows you to run sublimetext main.c:100:12 to open a file at a particular cursor point.); for others, it might require an editor-side plugin. Does Emacs have any comparable options? Or any IPC options for communicating with other processes (e.g., sending data over a pipe)?

@spookylukey
Copy link
Author

Yep, emacs has a 'server' mode you can start (M-x server-start), then it looks like:

emacsclient -n +100:12 main.c

That will open main.c, line 100, column 12 in your current emacs process.

Being able to do something like that would certainly be an adequate solution for me. I'm also investigating other test runners - although I haven't found anything else that works just right yet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants