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

Assert#dump() #146

Open
yegor256 opened this issue Sep 25, 2022 · 2 comments
Open

Assert#dump() #146

yegor256 opened this issue Sep 25, 2022 · 2 comments
Labels
enhancement Improve the expected

Comments

@yegor256
Copy link

yegor256 commented Sep 25, 2022

Would be nice to have a new method dump():

assert_cmd::Command::cargo_bin("foo")
  .unwrap()
  .current_dir(tmp.path())
  .arg("--verbose")
  .arg("bar")
  .assert()
  .dump() // here!
  .success();

It should print the entire stdout and stderr to console. This would be very convenient for debugging purposes.

@epage epage added the enhancement Improve the expected label Sep 26, 2022
@epage
Copy link
Contributor

epage commented Sep 26, 2022

I'm ok with someone implementing that. We would need to decide on the name first.

Might seem odd but I'd like a name that also works for snapbox so I can carry this change forward to that crate as well. I worry dump might be taken to mean "dump to disk" (like SNAPSHOTS=dump.

Some name ideas

  • dbg
  • print
  • log

@yegor256
Copy link
Author

@yegor256 I like print, since it's the closest to println! we usually use to print something temporary to console

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

No branches or pull requests

2 participants