Skip to content

Commit 6a8d55a

Browse files
committed
Extend tidy to allow conditionalizing tests for multiple targets.
1 parent cc8565b commit 6a8d55a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/tidy/src/pal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ fn find_test_mod(contents: &str) -> usize {
168168
let prev_newline_idx = contents[..prev_newline_idx].rfind('\n');
169169
if let Some(nl) = prev_newline_idx {
170170
let prev_line = &contents[nl + 1 .. mod_tests_idx];
171-
let emcc_cfg = "cfg(all(test, not(target_os";
172-
if prev_line.contains(emcc_cfg) {
171+
if prev_line.contains("cfg(all(test, not(target_os")
172+
|| prev_line.contains("cfg(all(test, not(any(target_os") {
173173
nl
174174
} else {
175175
mod_tests_idx

0 commit comments

Comments
 (0)