1 // this test asserts that the cwd of doctest invocations is set correctly.
3 // revisions: correct incorrect
5 // [correct]compile-flags:--test --test-run-directory={{src-base}} -Zunstable-options
6 // [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage -Zunstable-options
7 // normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
8 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
12 /// std::fs::read_to_string("run-directory.rs").unwrap(),
13 /// include_str!("run-directory.rs"),
20 /// assert!(std::fs::read_to_string("run-directory.rs").is_err());