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

Conversation

@johannhof
Copy link
Contributor

This commit adds Readme testing using skeptic.

I applied some experiences from adding skeptic to other libraries, such as the .travis.yml change that prevents intermittent Travis timeouts.

Unfortunately because skeptic only allows a single interpolation position we need to decide whether we want to display examples like this:

extern crate assert_cli;
fn main() {
  assert_cli::assert_cli_output("echo", &["42"], "42").unwrap();
} 

or like this:

assert_cli::assert_cli_output("echo", &["42"], "42").unwrap();

Meaning that, afaiu, we can't include extern crate without adding fn main.

@killercup
Copy link
Collaborator

Thanks! Looks very good!

Can you maybe tweak this a bit to only not use ignore and should_panic? Github doesn't syntax highlight code blocks with multiple language annotations. (I'll leave some inline comments.)

assert_cli!("black-box", &["--special"] => Error 42, "error no 42\n").unwrap()
fn main() {
assert_cli!("echo", &["42"] => Success, "42").unwrap();
assert_cli!("black-box", &["--special"] => Error 42, "error no 42\n").unwrap()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you find use any other, universally available cli tool (exit?) you can get rid of ignore :)

@johannhof
Copy link
Contributor Author

Huh, I thought the highlighting on my fork looked fine. https://github.com/johannhof/assert_cli

Am I missing something?

This commit adds Readme testing using
[skeptic](https://github.com/brson/rust-skeptic).
@killercup
Copy link
Collaborator

Huh, I thought the highlighting on my fork looked fine.

It does indeed (look at the skeptic branch of course). In the diff-view, it looked weird, but maybe the finally fixed that. Yay!

@killercup killercup merged commit f258611 into assert-rs:master Aug 22, 2016
@johannhof johannhof deleted the skeptic branch August 22, 2016 15:19
@killercup
Copy link
Collaborator

Released 0.3.0!

@johannhof
Copy link
Contributor Author

Yaaay

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants