Skip to content

Commit c7e3d8c

Browse files
committed
Make http hash test more resilient
1 parent 8538265 commit c7e3d8c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/componentize.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{io::Write, path::Path, process::Stdio};
22

33
use assert_cmd::Command;
44
use fs_extra::dir::CopyOptions;
5-
use predicates::prelude::predicate;
5+
use predicates::prelude::{predicate, PredicateBooleanExt};
66

77
#[test]
88
fn cli_example() -> anyhow::Result<()> {
@@ -112,13 +112,13 @@ All mimsy were the borogoves,
112112
])
113113
.assert()
114114
.success()
115-
.stdout(predicate::str::is_match(
116-
"
117-
https://webassembly.github.io/spec/core/: .+
118-
https://bytecodealliance.org/: .+
119-
https://www.w3.org/groups/wg/wasm/: .+
120-
",
121-
)?);
115+
.stdout(
116+
predicate::str::contains("https://webassembly.github.io/spec/core/:").and(
117+
predicate::str::contains("https://bytecodealliance.org/:").and(
118+
predicate::str::contains("https://www.w3.org/groups/wg/wasm/:"),
119+
),
120+
),
121+
);
122122

123123
handle.kill()?;
124124

0 commit comments

Comments
 (0)