Skip to content

Commit

Permalink
Attempt at fixing broken test under windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri6037 committed Dec 5, 2024
1 parent c5c1ad2 commit 3998b5a
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 15 deletions.
86 changes: 74 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dump/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ edition = "2018"

[dependencies]
clap = "2.27.0"
bpx = { version = "4.0.0-rc.10.0.1", features = ["sd", "sd-formatting"] }
bpx = { version = "4.0.0-rc.12.0.0", features = ["sd", "sd-formatting"] }
bp3d-util = { version = "1.4.0", features = ["result", "simple-error"] }

[dev-dependencies]
assert_cmd = "1.0.4"
predicates = "1.0.8"
assert_cmd = "2.0.16"
predicates = "3.1.2"
9 changes: 9 additions & 0 deletions package/tests/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ use assert_cmd::Command;
use file_diff::diff;
use serial_test::serial;

#[cfg(unix)]
const EXPECTED_OUTPUT: &str = "Decoding object table:
Name = 'LICENSE.txt', Size = 1518 byte(s)
";

#[cfg(windows)]
const EXPECTED_OUTPUT_WIN: &str = "Decoding object table:
Name = 'LICENSE.txt', Size = 1545 byte(s)
";

#[test]
#[serial]
fn pack_unpack() {
Expand Down Expand Up @@ -66,6 +72,9 @@ fn pack_list() {
.unwrap()
.args(&["-f", "test.bpx", "-l"])
.assert();
#[cfg(windows)]
assert.success().stdout(EXPECTED_OUTPUT_WIN).stderr("");
#[cfg(unix)]
assert.success().stdout(EXPECTED_OUTPUT).stderr("");
remove_file("test.bpx").unwrap();
}

0 comments on commit 3998b5a

Please sign in to comment.