diff options
| author | Oneirical <manchot@videotron.ca> | 2024-06-26 11:44:11 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2024-06-26 11:44:11 -0400 |
| commit | 722ae2243ece024797c006d1812c6abd3158f720 (patch) | |
| tree | a04c12b93069d8b67e4454860c785e4d508d4936 /tests/run-make/pretty-print-to-file | |
| parent | 2ffff791ce0d5d29a0e47d9c5519fcccdb696e9f (diff) | |
| download | rust-722ae2243ece024797c006d1812c6abd3158f720.tar.gz rust-722ae2243ece024797c006d1812c6abd3158f720.zip | |
rewrite pretty-print-to-file to rmake
Diffstat (limited to 'tests/run-make/pretty-print-to-file')
| -rw-r--r-- | tests/run-make/pretty-print-to-file/Makefile | 5 | ||||
| -rw-r--r-- | tests/run-make/pretty-print-to-file/rmake.rs | 12 |
2 files changed, 12 insertions, 5 deletions
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(); +} |
