Skip to content

Commit fa20b49

Browse files
committed
tests: Enable testing of zstd compressed tarballs
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
1 parent 1190714 commit fa20b49

File tree

5 files changed

+226
-156
lines changed

5 files changed

+226
-156
lines changed

tests/cli-rustup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ info: note that the toolchain 'nightly-{0}' is currently in use (directory overr
323323
}
324324

325325
#[test]
326-
fn rustup_xz() {
326+
fn rustup_zstd() {
327327
setup(&|config| {
328328
set_current_dist_date(config, "2015-01-01");
329329
expect_stderr_ok(
@@ -335,7 +335,7 @@ fn rustup_xz() {
335335
"nightly",
336336
"--no-self-update",
337337
],
338-
for_host!(r"dist/2015-01-01/rust-std-nightly-{0}.tar.xz"),
338+
for_host!(r"dist/2015-01-01/rust-std-nightly-{0}.tar.zst"),
339339
);
340340
});
341341
}

tests/cli-v2.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,10 @@ fn bad_sha_on_installer() {
328328
let file = file.unwrap();
329329
let path = file.path();
330330
let filename = path.to_string_lossy();
331-
if filename.ends_with(".tar.gz") || filename.ends_with(".tar.xz") {
331+
if filename.ends_with(".tar.gz")
332+
|| filename.ends_with(".tar.xz")
333+
|| filename.ends_with(".tar.zst")
334+
{
332335
rustup::utils::raw::write_file(&path, "xxx").unwrap();
333336
}
334337
}

0 commit comments

Comments
 (0)