Skip to content

Commit 11ac258

Browse files
committed
rewrite silly-file-names to rmake
1 parent 16df91b commit 11ac258

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ run-make/sepcomp-cci-copies/Makefile
162162
run-make/sepcomp-inlining/Makefile
163163
run-make/sepcomp-separate/Makefile
164164
run-make/share-generics-dylib/Makefile
165-
run-make/silly-file-names/Makefile
166165
run-make/simd-ffi/Makefile
167166
run-make/split-debuginfo/Makefile
168167
run-make/stable-symbol-names/Makefile

tests/run-make/silly-file-names/Makefile

-12
This file was deleted.
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// There used to be assert! checks in the compiler to error on encountering
2+
// files starting or ending with < or > respectively, as a preventive measure
3+
// against "fake" files like <anon>. However, this was not truly required,
4+
// as rustc has other checks to verify the veracity of a file. This test includes
5+
// some files with < and > in their names and prints out their output to stdout,
6+
// expecting no errors.
7+
// See https://github.com/rust-lang/rust/issues/73419
8+
9+
//@ ignore-cross-compile
10+
// Reason: the compiled binary is executed
11+
//@ ignore-windows
12+
// Reason: Windows refuses files with < and > in their names
13+
14+
use run_make_support::{diff, fs_wrapper, run, rustc};
15+
16+
fn main() {
17+
fs_wrapper::create_file("<leading-lt");
18+
fs_wrapper::write("<leading-lt", r#""comes from a file with a name that begins with <""#);
19+
fs_wrapper::create_file("trailing-gt>");
20+
fs_wrapper::write("trailing-gt>", r#""comes from a file with a name that ends with >""#);
21+
rustc().input("silly-file-names.rs").output("silly-file-names").run();
22+
let out = run("silly-file-names").stdout_utf8();
23+
diff().expected_file("silly-file-names.run.stdout").actual_text("actual-stdout", out).run();
24+
}

0 commit comments

Comments
 (0)