Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

Can't validate stderr/stdout don't have some text #31

Closed
epage opened this issue Mar 24, 2017 · 1 comment
Closed

Can't validate stderr/stdout don't have some text #31

epage opened this issue Mar 24, 2017 · 1 comment

Comments

@epage
Copy link
Collaborator

epage commented Mar 24, 2017

In upgrading cobalt.rs to 0.4, I found that they tested for the absence of text (to verify logging levels). There doesn't seem to be a way to do this with the new API

See https://github.com/cobalt-org/cobalt.rs/blob/master/tests/cli.rs

epage added a commit to epage/cobalt.rs that referenced this issue Mar 24, 2017
Dependencies that were held back:
- assert_cli: See assert-rs/assert_cli#30 and assert-rs/assert_cli#31
- rss: Seems they turned off XML escaping.  Didn't have time to research
  this.
epage added a commit to epage/cobalt.rs that referenced this issue Mar 24, 2017
Upgrade notes:
- notify: Debouncing was added but have not yet switched to it because of
  the extra work to extract the relevant path

Dependencies that were held back:
- assert_cli: See assert-rs/assert_cli#30 and assert-rs/assert_cli#31
- rss: Seems they turned off XML escaping.  Didn't have time to research
  this.
@killercup
Copy link
Collaborator

That's a valid feature request. :) I'm currently redesigning the way we internally handle output assertions (#24), and want to have multiple fuzzy matchers some time in the future (#20). Maybe we can combine this with negative matches? Shouldn't be too hard.

I'm thinking of something like

#[test]
fn negative_fuzzy() {
    Assert::command("echo foo")
        .prints("foo")
        .doesnt_print("bar")
        .unwrap();
}

@epage epage mentioned this issue Sep 7, 2017
3 tasks
epage added a commit to epage/assert_cli that referenced this issue Sep 9, 2017
- `.doesnt_print`, `.doesnt_print_exactly`
- `.doesnt_print_error`, `.doesnt_print_error_exactly`

Fixes assert-rs#31
epage added a commit to epage/assert_cli that referenced this issue Sep 9, 2017
- `.doesnt_print`, `.doesnt_print_exactly`
- `.doesnt_print_error`, `.doesnt_print_error_exactly`

Fixes assert-rs#31
epage added a commit to epage/assert_cli that referenced this issue Sep 13, 2017
- `.doesnt_print`, `.doesnt_print_exactly`
- `.doesnt_print_error`, `.doesnt_print_error_exactly`

Fixes assert-rs#31
epage added a commit to epage/assert_cli that referenced this issue Sep 13, 2017
- `.doesnt_print`, `.doesnt_print_exactly`
- `.doesnt_print_error`, `.doesnt_print_error_exactly`

Fixes assert-rs#31
@epage epage closed this as completed Sep 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants