about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOneirical <manchot@videotron.ca>2024-06-26 11:44:11 -0400
committerOneirical <manchot@videotron.ca>2024-06-26 11:44:11 -0400
commit722ae2243ece024797c006d1812c6abd3158f720 (patch)
treea04c12b93069d8b67e4454860c785e4d508d4936
parent2ffff791ce0d5d29a0e47d9c5519fcccdb696e9f (diff)
downloadrust-722ae2243ece024797c006d1812c6abd3158f720.tar.gz
rust-722ae2243ece024797c006d1812c6abd3158f720.zip
rewrite pretty-print-to-file to rmake
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt2
-rw-r--r--tests/run-make/pretty-print-to-file/Makefile5
-rw-r--r--tests/run-make/pretty-print-to-file/rmake.rs12
3 files changed, 12 insertions, 7 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 2f64b6004fd..fa754d2e6d5 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -84,7 +84,6 @@ run-make/jobserver-error/Makefile
 run-make/libs-through-symlinks/Makefile
 run-make/libtest-json/Makefile
 run-make/libtest-junit/Makefile
-run-make/libtest-padding/Makefile
 run-make/libtest-thread-limit/Makefile
 run-make/link-cfg/Makefile
 run-make/link-framework/Makefile
@@ -133,7 +132,6 @@ run-make/pgo-gen/Makefile
 run-make/pgo-indirect-call-promotion/Makefile
 run-make/pgo-use/Makefile
 run-make/pointer-auth-link-with-c/Makefile
-run-make/pretty-print-to-file/Makefile
 run-make/print-calling-conventions/Makefile
 run-make/print-target-list/Makefile
 run-make/profile/Makefile
diff --git a/tests/run-make/pretty-print-to-file/Makefile b/tests/run-make/pretty-print-to-file/Makefile
deleted file mode 100644
index ca11b8c47f0..00000000000
--- a/tests/run-make/pretty-print-to-file/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../tools.mk
-
-all:
-	$(RUSTC) -o $(TMPDIR)/input.out -Zunpretty=normal input.rs
-	diff -u $(TMPDIR)/input.out input.pp
diff --git a/tests/run-make/pretty-print-to-file/rmake.rs b/tests/run-make/pretty-print-to-file/rmake.rs
new file mode 100644
index 00000000000..c23514ae849
--- /dev/null
+++ b/tests/run-make/pretty-print-to-file/rmake.rs
@@ -0,0 +1,12 @@
+// The "pretty-printer" of rustc translates source code into other formats,
+// which is useful for debugging. This test checks the "normal" version of
+// -Zunpretty, which should format the poorly formatted input.rs into a one-line
+// function identical to the one in input.pp.
+// See https://github.com/rust-lang/rust/commit/da25539c1ab295ec40261109557dd4526923928c
+
+use run_make_support::{diff, rustc};
+
+fn main() {
+    rustc().output("input.out").arg("-Zunpretty=normal").input("input.rs").run();
+    diff().expected_file("input.out").actual_file("input.pp").run();
+}