Skip to content

Commit

Permalink
Migrate weird-output-filenames to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Rejyr committed Jun 29, 2024
1 parent 614e042 commit 56fe015
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 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 @@ -188,5 +188,4 @@ run-make/type-mismatch-same-crate-name/Makefile
run-make/unstable-flag-required/Makefile
run-make/wasm-exceptions-nostd/Makefile
run-make/wasm-override-linker/Makefile
run-make/weird-output-filenames/Makefile
run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile
15 changes: 0 additions & 15 deletions tests/run-make/weird-output-filenames/Makefile

This file was deleted.

19 changes: 19 additions & 0 deletions tests/run-make/weird-output-filenames/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use run_make_support::fs_wrapper::copy;
use run_make_support::regex::Regex;
use run_make_support::{cwd, rustc};

fn main() {
let invalid_characters = [".foo.rs", ".foo.bar", "+foo+bar.rs"];
let re = Regex::new(r"invalid character.*in crate name:").unwrap();
for f in invalid_characters {
copy("foo.rs", f);
let stderr = rustc().input(f).run_fail().stderr_utf8();
assert!(re.is_match(&stderr));
}

copy("foo.rs", "-foo.rs");
rustc()
.input(cwd().join("-foo.rs"))
.run_fail()
.assert_stderr_contains("crate names cannot start with a `-`");
}

0 comments on commit 56fe015

Please sign in to comment.