Make pretty-expanded-hygiene a ui test
`normalize-stdout-test` removes the need for Make, and it can be updated with `--bless` this way
This commit is contained in:
parent
03178f31c4
commit
a4a7bb9a3f
3 changed files with 12 additions and 21 deletions
|
|
@ -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
|
||||
|
|
@ -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]
|
||||
|
|
@ -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 */]
|
||||
Loading…
Add table
Add a link
Reference in a new issue