Skip to content

Commit

Permalink
✅ Add test for restore acl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Nov 16, 2024
1 parent 835c90f commit aa03d4e
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions cli/tests/restore_acl.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#![cfg(feature = "acl")]
use clap::Parser;
use portable_network_archive::{cli, command};

#[test]
fn extract_windows_acl() {
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"x",
"../resources/test/windows_acl.pna",
"--overwrite",
"--out-dir",
&format!("{}/windows_acl/", env!("CARGO_TARGET_TMPDIR")),
"--keep-acl",
"--unstable",
]))
.unwrap();
}

#[test]
fn extract_linux_acl() {
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"x",
"../resources/test/linux_acl.pna",
"--overwrite",
"--out-dir",
&format!("{}/linux_acl/", env!("CARGO_TARGET_TMPDIR")),
"--keep-acl",
"--unstable",
]))
.unwrap();
}

#[test]
fn extract_macos_acl() {
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"x",
"../resources/test/macos_acl.pna",
"--overwrite",
"--out-dir",
&format!("{}/macos_acl/", env!("CARGO_TARGET_TMPDIR")),
"--keep-acl",
"--unstable",
]))
.unwrap();
}

#[test]
fn extract_freebsd_acl() {
command::entry(cli::Cli::parse_from([
"pna",
"--quiet",
"x",
"../resources/test/freebsd_acl.pna",
"--overwrite",
"--out-dir",
&format!("{}/freebsd_acl/", env!("CARGO_TARGET_TMPDIR")),
"--keep-acl",
"--unstable",
]))
.unwrap();
}
Binary file added resources/test/freebsd_acl.pna
Binary file not shown.
Binary file added resources/test/linux_acl.pna
Binary file not shown.
Binary file added resources/test/macos_acl.pna
Binary file not shown.
Binary file added resources/test/windows_acl.pna
Binary file not shown.

0 comments on commit aa03d4e

Please sign in to comment.