Skip to content

Commit

Permalink
fix test to not read archive while writing to it
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielDertoni committed Jan 12, 2025
1 parent d312269 commit b47bf84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,8 @@ fn pax_simple() {
fn pax_simple_write() {
let td = t!(TempBuilder::new().prefix("tar-rs").tempdir());
let pax_path = td.path().join("pax.tar");
let test2 = td.path().join("test2");
t!(std::fs::write(&test2, "Hello, world"));
let file: File = t!(File::create(&pax_path));
let mut ar: Builder<BufWriter<File>> = Builder::new(BufWriter::new(file));

Expand All @@ -967,7 +969,7 @@ fn pax_simple_write() {
];

t!(ar.append_pax_extensions(pax_extensions));
t!(ar.append_file("test2", &mut t!(File::open(&pax_path))));
t!(ar.append_file("test2", &mut t!(File::open(&test2))));
t!(ar.finish());
drop(ar);

Expand Down

0 comments on commit b47bf84

Please sign in to comment.