about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-07-15 22:26:45 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2019-07-16 21:23:29 +0100
commita4a7bb9a3f72505efb6ca9856af45287c8685d5e (patch)
tree433025c0790fc5bc32537b7e2f83cfc76dc8e1b6 /src
parent03178f31c461af42bb61815cc206443c5842ebe0 (diff)
downloadrust-a4a7bb9a3f72505efb6ca9856af45287c8685d5e.tar.gz
rust-a4a7bb9a3f72505efb6ca9856af45287c8685d5e.zip
Make pretty-expanded-hygiene a `ui` test
`normalize-stdout-test` removes the need for Make, and it can be updated
with `--bless` this way
Diffstat (limited to 'src')
-rw-r--r--src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile21
-rw-r--r--src/test/ui/hygiene/unpretty-debug.rs (renamed from src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs)6
-rw-r--r--src/test/ui/hygiene/unpretty-debug.stdout (renamed from src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs)6
3 files changed, 12 insertions, 21 deletions
diff --git a/src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile b/src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile
deleted file mode 100644
index 136d7643ade..00000000000
--- a/src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
--include ../tools.mk
-
-REPLACEMENT := s/[0-9][0-9]*\#[0-9][0-9]*/$(shell date)/g
-
-all:
-	$(RUSTC) -o $(TMPDIR)/input.out -Z unstable-options \
-		--pretty expanded,hygiene input.rs
-
-	# the name/ctxt numbers are very internals-dependent and thus
-	# change relatively frequently, and testing for their exact values
-	# them will fail annoyingly, so we just check their positions
-	# (using a non-constant replacement like this will make it less
-	# likely the compiler matches whatever other dummy value we
-	# choose).
-	#
-	# (These need to be out-of-place because OSX/BSD & GNU sed
-	# differ.)
-	sed "$(REPLACEMENT)" input.pp.rs > $(TMPDIR)/input.pp.rs
-	sed "$(REPLACEMENT)" $(TMPDIR)/input.out > $(TMPDIR)/input.out.replaced
-
-	diff -u $(TMPDIR)/input.out.replaced $(TMPDIR)/input.pp.rs
diff --git a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs b/src/test/ui/hygiene/unpretty-debug.rs
index ed3b48dbdc1..6e936bb3d83 100644
--- a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs
+++ b/src/test/ui/hygiene/unpretty-debug.rs
@@ -1,3 +1,9 @@
+// check-pass
+// compile-flags: -Zunpretty=expanded,hygiene
+
+// Don't break whenever Symbol numbering changes
+// normalize-stdout-test "\d+#" -> "0#"
+
 // minimal junk
 #![feature(no_core)]
 #![no_core]
diff --git a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs b/src/test/ui/hygiene/unpretty-debug.stdout
index 570dece023d..beac4c17abf 100644
--- a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs
+++ b/src/test/ui/hygiene/unpretty-debug.stdout
@@ -1,3 +1,9 @@
+// check-pass
+// compile-flags: -Zunpretty=expanded,hygiene
+
+// Don't break whenever Symbol numbering changes
+// normalize-stdout-test "\d+#" -> "0#"
+
 // minimal junk
 #![feature /* 0#0 */(no_core)]
 #![no_core /* 0#0 */]