Skip to content

Commit

Permalink
attempt rewriting last condition in link-dedup
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 4, 2024
1 parent 841f4cc commit 1368307
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/run-make/link-dedup/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ fn main() {
assert!(output.contains("-ltesta"));
let output = String::from_utf8(rustc().input("empty.rs").command_output().stderr).unwrap();
assert!(!output.contains("-ltestb"));
let output = String::from_utf8(rustc().input("empty.rs").command_output().stderr).unwrap();
assert_eq!(output.matches("-ltesta").count(), 1);
let output = rustc().input("empty.rs").command_output().stderr;
let pattern = "\"-ltesta\" \"-ltesta\" \"-ltesta\"";
for window in output.windows(pattern.len()) {
if window == pattern {
panic!("ltesta was repeated too many times");
}
}
}

0 comments on commit 1368307

Please sign in to comment.