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

crates.io version panics #115

Closed
tshepang opened this issue Jun 28, 2018 · 8 comments
Closed

crates.io version panics #115

tshepang opened this issue Jun 28, 2018 · 8 comments

Comments

@tshepang
Copy link

tshepang commented Jun 28, 2018

  • assert_cli version: 0.6.1
  • Rust version: rustc 1.28.0-nightly (cd494c1f0 2018-06-27)
  • OS and version: Debian testing
   Assert::command(&["ls", "/"])
        .current_dir(repo)
        .stdout()
        .is("")
        .execute()?;

Above results in this panic:

thread 'main' panicked at 'attempt to subtract with overflow', /home/tshepang/.cargo/registry/src/github.com-1ecc6299db9ec823/assert_cli-0.6.1/src/diff.rs:18:29

git master instead gives:

Assertion failed for ls /

@epage
Copy link
Collaborator

epage commented Jun 28, 2018

Ok, so since master works, I'm assuming that is because of #113 .

Would you be willing to give assert_cmd a try? We're prepping it as the direct replacement for assert_cmd and we'll eventually transform assert_cli into something more. It shouldn't have this problem and it'd be good to get more feedback on it.

I have an example for cobalt converting. The main thing missing atm is saying "why" things failed.

If that doesn't work for you, we can go ahead and get another assert_cli release out.

@tshepang
Copy link
Author

I think you meant to link to a different issue number?

@tshepang
Copy link
Author

By "why", do you mean it does not do diffs (expected vs. got)?

@epage
Copy link
Collaborator

epage commented Jun 29, 2018

Fixed the PR number.

And yes, it doesn't do the diffs yet.

@tshepang
Copy link
Author

ok, I do need those diffs. Without those, how do you know what failed?

@epage
Copy link
Collaborator

epage commented Jun 29, 2018

Yeah, its less than ideal. You know what line in your code failed but you don't know why it failed. It forces you to go and manually reproduce the test setup.

Since that feature is a blocker for you, I'll try to get a new assert_cli release out later today or tomorrow.

Hopefully it won't take too long for me to finish adding the explanation for why a test failed to assert_cmd so it can replace assert_cli for you.

@tshepang
Copy link
Author

Ok, thanks in advance, and I sure will check assert_cmd soon

@epage
Copy link
Collaborator

epage commented Jun 29, 2018

Got 0.6.2 up

@epage epage closed this as completed Jun 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants