More readable tests.

This commit is contained in:
Andrés N. Robalino
2019-08-01 04:25:48 -05:00
parent 610a91a658
commit 0893f89e89
3 changed files with 52 additions and 27 deletions

View File

@ -15,9 +15,11 @@ fn external_num() {
#[test]
fn inc_plugin() {
nu!(output,
nu!(
output,
cwd("tests/fixtures/formats"),
"open sgml_description.json | get glossary.GlossDiv.GlossList.GlossEntry.Height | inc | echo $it");
"open sgml_description.json | get glossary.GlossDiv.GlossList.GlossEntry.Height | inc | echo $it"
);
assert_eq!(output, "11");
}
@ -26,7 +28,8 @@ fn inc_plugin() {
fn add_plugin() {
nu!(output,
cwd("tests/fixtures/formats"),
"open cargo_sample.toml | add dev-dependencies.newdep \"1\" | get dev-dependencies.newdep | echo $it");
"open cargo_sample.toml | add dev-dependencies.newdep \"1\" | get dev-dependencies.newdep | echo $it"
);
assert_eq!(output, "1");
}
@ -35,7 +38,8 @@ fn add_plugin() {
fn edit_plugin() {
nu!(output,
cwd("tests/fixtures/formats"),
"open cargo_sample.toml | edit dev-dependencies.pretty_assertions \"7\" | get dev-dependencies.pretty_assertions | echo $it");
"open cargo_sample.toml | edit dev-dependencies.pretty_assertions \"7\" | get dev-dependencies.pretty_assertions | echo $it"
);
assert_eq!(output, "7");
}