Add a test for unit test of proc-macro crate

This commit is contained in:
hyd-dev 2021-01-19 00:26:15 +08:00
parent ecab8a4fae
commit 28577924e7
No known key found for this signature in database
GPG Key ID: 74FA7FD5B8DA14B8
4 changed files with 8 additions and 1 deletions

View File

@ -102,7 +102,7 @@ def test_cargo_miri_test():
)
test("`cargo miri test` (subcrate, no isolation)",
cargo_miri("test") + ["-p", "subcrate"],
"test.subcrate.stdout.ref", "test.stderr-empty.ref",
"test.subcrate.stdout.ref", "test.stderr-proc-macro.ref",
env={'MIRIFLAGS': "-Zmiri-disable-isolation"},
)

View File

@ -4,6 +4,10 @@ version = "0.1.0"
authors = ["Miri Team"]
edition = "2018"
[lib]
proc-macro = true
doctest = false
[[bin]]
name = "subcrate"
path = "main.rs"

View File

@ -0,0 +1,2 @@
#[cfg(test)]
compile_error!("Miri should not touch me");

View File

@ -0,0 +1 @@
Running unit tests of `proc-macro` crates is not currently supported by Miri.