rust/tests/run-make/track-path-dep-info/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
623 B
Rust
Raw Normal View History

2024-07-05 12:33:51 -05:00
// This test checks the functionality of `tracked_path::path`, a procedural macro
// feature that adds a dependency to another file inside the procmacro. In this case,
// the text file is added through this method, and the test checks that the compilation
// output successfully added the file as a dependency.
// See https://github.com/rust-lang/rust/pull/84029
2024-07-17 08:31:38 -05:00
use run_make_support::{rfs, rustc};
2024-07-05 12:33:51 -05:00
fn main() {
2024-07-05 12:45:06 -05:00
rustc().input("macro_def.rs").run();
2024-07-05 12:33:51 -05:00
rustc().env("EXISTING_PROC_MACRO_ENV", "1").emit("dep-info").input("macro_use.rs").run();
assert!(rfs::read_to_string("macro_use.d").contains("emojis.txt:"));
2024-07-05 12:33:51 -05:00
}