Skip to content

Commit

Permalink
Rewrite and rename issue-26092 to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 4, 2024
1 parent 40e35d6 commit 841f4cc
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ run-make/issue-20626/Makefile
run-make/issue-22131/Makefile
run-make/issue-25581/Makefile
run-make/issue-26006/Makefile
run-make/issue-26092/Makefile
run-make/issue-28595/Makefile
run-make/issue-33329/Makefile
run-make/issue-35164/Makefile
Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/issue-26092/Makefile

This file was deleted.

12 changes: 0 additions & 12 deletions tests/run-make/link-dedup/Makefile

This file was deleted.

4 changes: 3 additions & 1 deletion tests/run-make/link-dedup/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

//@ ignore-msvc

use run_make_support::rustc;

fn main() {
rustc().input("depa.rs").run();
rustc().input("depb.rs").run();
Expand All @@ -28,5 +30,5 @@ fn main() {
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);
assert_eq!(output.matches("-ltesta").count(), 1);
}
File renamed without changes.
15 changes: 15 additions & 0 deletions tests/run-make/no-panic-blank-output/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// When an empty output file is passed to rustc, the ensuing error message
// should be clear. However, calling file_stem on an empty path returns None,
// which, when unwrapped, causes a panic, stopping execution of rustc
// and printing an obscure message instead of reaching the helpful
// error message. This test checks that the panic does not occur.
// See https://github.com/rust-lang/rust/pull/26199

use run_make_support::rustc;

fn main() {
let output = String::from_utf8(rustc().output("").input("blank.rs").command_output().stderr)
.unwrap()
.to_lowercase();
assert!(!output.contains("panic"));
}

0 comments on commit 841f4cc

Please sign in to comment.