Skip to content

Commit

Permalink
✅ Add cli test for --unsolid and --keep-solid options
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Oct 6, 2024
1 parent acadc57 commit 4ec9095
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions cli/tests/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,72 @@ fn delete_output_exclude() {
]))
.unwrap();
}

#[test]
fn delete_solid() {
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"c",
&format!("{}/delete_solid.pna", env!("CARGO_TARGET_TMPDIR")),
"--overwrite",
"--solid",
"-r",
"../resources/test/raw",
]))
.unwrap();
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"experimental",
"delete",
&format!("{}/delete_solid.pna", env!("CARGO_TARGET_TMPDIR")),
"resources/test/raw/text.txt",
]))
.unwrap();
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"x",
&format!("{}/delete_solid.pna", env!("CARGO_TARGET_TMPDIR")),
"--overwrite",
"--out-dir",
&format!("{}/delete_solid/", env!("CARGO_TARGET_TMPDIR")),
]))
.unwrap();
}

#[test]
fn delete_unsolid() {
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"c",
&format!("{}/delete_unsolid.pna", env!("CARGO_TARGET_TMPDIR")),
"--overwrite",
"--solid",
"-r",
"../resources/test/raw",
]))
.unwrap();
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"experimental",
"delete",
"--unsolid",
&format!("{}/delete_unsolid.pna", env!("CARGO_TARGET_TMPDIR")),
"resources/test/raw/text.txt",
]))
.unwrap();
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"x",
&format!("{}/delete_unsolid.pna", env!("CARGO_TARGET_TMPDIR")),
"--overwrite",
"--out-dir",
&format!("{}/delete_unsolid/", env!("CARGO_TARGET_TMPDIR")),
]))
.unwrap();
}

0 comments on commit 4ec9095

Please sign in to comment.