Simplify tests
@alexcrichton I think there is one bit of tests that could be simplified.
What do you think about writing this
```Rust
test!(simple {
pkg("foo", "0.0.1");
assert_that(cargo_process("install").arg("foo"),
execs().with_status(0).with_stdout(&format!("\
[UPDATING] registry `[..]`
[DOWNLOADING] foo v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 (registry file://[..])
[INSTALLING] {home}[..]bin[..]foo[..]
",
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
assert_that(cargo_process("uninstall").arg("foo"),
execs().with_status(0).with_stdout(&format!("\
[REMOVING] {home}[..]bin[..]foo[..]
",
home = cargo_home().display())));
assert_that(cargo_home(), is_not(has_installed_exe("foo")));
});
```
instead of this
```Rust
test!(simple {
pkg("foo", "0.0.1");
assert_that(cargo_process("install").arg("foo"),
execs().with_status(0).with_stdout(&format!("\
{updating} registry `[..]`
{downloading} foo v0.0.1 (registry file://[..])
{compiling} foo v0.0.1 (registry file://[..])
{installing} {home}[..]bin[..]foo[..]
",
updating = UPDATING,
downloading = DOWNLOADING,
compiling = COMPILING,
installing = INSTALLING,
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
assert_that(cargo_process("uninstall").arg("foo"),
execs().with_status(0).with_stdout(&format!("\
{removing} {home}[..]bin[..]foo[..]
",
removing = REMOVING,
home = cargo_home().display())));
assert_that(cargo_home(), is_not(has_installed_exe("foo")));
});
```
This PR has a proof of concept implementation of this feature applied to a couple of tests.
r? @alexcrichton