Skip to content

Commit 6c06098

Browse files
committed
Migrate weird-output-filenames to rmake
1 parent 1461a04 commit 6c06098

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,4 @@ run-make/use-suggestions-rust-2018/Makefile
200200
run-make/used-cdylib-macos/Makefile
201201
run-make/wasm-exceptions-nostd/Makefile
202202
run-make/wasm-override-linker/Makefile
203-
run-make/weird-output-filenames/Makefile
204203
run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile

tests/run-make/weird-output-filenames/Makefile

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use run_make_support::fs_wrapper::copy;
2+
use run_make_support::regex::Regex;
3+
use run_make_support::{cwd, rustc};
4+
5+
fn main() {
6+
let invalid_characters = [".foo.rs", ".foo.bar", "+foo+bar.rs"];
7+
let re = Regex::new(r"invalid character.*in crate name:").unwrap();
8+
for f in invalid_characters {
9+
copy("foo.rs", f);
10+
let stderr = rustc().input(f).run_fail().stderr_utf8();
11+
assert!(re.is_match(&stderr));
12+
}
13+
14+
copy("foo.rs", "-foo.rs");
15+
rustc()
16+
.input(cwd().join("-foo.rs"))
17+
.run_fail()
18+
.assert_stderr_contains("crate names cannot start with a `-`");
19+
}

0 commit comments

Comments
 (0)