Make tests work on Windows
This commit is contained in:
parent
a7449af65c
commit
69da38496e
|
@ -22,10 +22,10 @@ where F: Fn(PathBuf) -> Result<u32, gif::DecodingError> {
|
|||
path.push("*.gif");
|
||||
let pattern = &*format!("{}", path.display());
|
||||
for path in glob::glob(pattern).unwrap().filter_map(Result::ok) {
|
||||
print!("{:?}: ", path.clone());
|
||||
print!("{}: ", path.to_string_lossy());
|
||||
match func(path.clone()) {
|
||||
Ok(crc) => {
|
||||
results.insert(format!("{:?}", path), format!("{}", crc));
|
||||
results.insert(path, format!("{}", crc));
|
||||
println!("{}", crc)
|
||||
},
|
||||
Err(_) if path.file_name().unwrap().to_str().unwrap().starts_with("x") => {
|
||||
|
@ -46,7 +46,7 @@ where F: Fn(PathBuf) -> Result<u32, gif::DecodingError> {
|
|||
if parts[1] == "Expected failure" {
|
||||
failures += 1;
|
||||
} else {
|
||||
ref_results.insert(parts[0].to_string(), parts[1].to_string());
|
||||
ref_results.insert(PathBuf::from(parts[0]), parts[1].to_string());
|
||||
}
|
||||
}
|
||||
assert_eq!(expected_failures, failures);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
"tests/samples/alpha_gif_a.gif": 3871893825
|
||||
"tests/samples/anim-gr.gif": 291646878
|
||||
"tests/samples/beacon.gif": 2462153529
|
||||
"tests/samples/interlaced.gif": 2115495372
|
||||
"tests/samples/moon_impact.gif": 2438689726
|
||||
"tests/samples/sample_1.gif": 3275424619
|
||||
"tests/samples/2x2.gif": 3802149240
|
||||
"tests/samples/sample_big.gif": 4184562096
|
||||
"tests/samples/gifplayer-muybridge.gif": 4267078865
|
||||
"tests/samples/set_hsts.gif": 224161812
|
||||
tests/samples/alpha_gif_a.gif: 3871893825
|
||||
tests/samples/anim-gr.gif: 291646878
|
||||
tests/samples/beacon.gif: 2462153529
|
||||
tests/samples/interlaced.gif: 2115495372
|
||||
tests/samples/moon_impact.gif: 2438689726
|
||||
tests/samples/sample_1.gif: 3275424619
|
||||
tests/samples/2x2.gif: 3802149240
|
||||
tests/samples/sample_big.gif: 4184562096
|
||||
tests/samples/gifplayer-muybridge.gif: 4267078865
|
||||
tests/samples/set_hsts.gif: 224161812
|
||||
|
|
Loading…
Reference in New Issue