Skip to content

Commit

Permalink
test [nfc]: Fix typos; cut one comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Dec 4, 2022
1 parent da7b78c commit a4f3703
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ y = "z""#;
let stdout = str::from_utf8(cmd.stdout.as_slice()).unwrap();
assert_eq!("\"z\"\n", stdout);

// x.z does not exists
// x.z does not exist
let cmd = process::Command::new(get_exec_path())
.args(["get", toml_file, "x.z"])
.output()
Expand All @@ -43,7 +43,6 @@ y = "z""#;

#[test]
fn integration_test_cmd_set() {
// fn set(path: PathBuf, query: &str, value_str: &str, opts: SetOpts) -> Result<(), Error> {
let body = r#"[a]
b = "c"
[x]
Expand All @@ -60,26 +59,26 @@ y = "z""#;
.unwrap();
assert!(cmd.status.success());
let stdout = str::from_utf8(cmd.stdout.as_slice()).unwrap();
let excepted = r#"[a]
let expected = r#"[a]
b = "c"
[x]
y = "new"
"#;
assert_eq!(excepted, stdout);
assert_eq!(expected, stdout);

let cmd = process::Command::new(get_exec_path())
.args(["set", toml_file, "x.z", "123"])
.output()
.unwrap();
assert!(cmd.status.success());
let stdout = str::from_utf8(cmd.stdout.as_slice()).unwrap();
let excepted = r#"[a]
let expected = r#"[a]
b = "c"
[x]
y = "z"
z = "123"
"#;
assert_eq!(excepted, stdout);
assert_eq!(expected, stdout);
}

fn get_exec_path() -> PathBuf {
Expand Down

0 comments on commit a4f3703

Please sign in to comment.