rewrite error-writing-dependencies to rmake · rust-lang/rust@f22b5af (original) (raw)
File tree
3 files changed
lines changed
- tests/run-make/error-writing-dependencies
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -34,7 +34,6 @@ run-make/emit-shared-files/Makefile | ||
34 | 34 | run-make/emit-stack-sizes/Makefile |
35 | 35 | run-make/emit-to-stdout/Makefile |
36 | 36 | run-make/env-dep-info/Makefile |
37 | -run-make/error-writing-dependencies/Makefile | |
38 | 37 | run-make/export-executable-symbols/Makefile |
39 | 38 | run-make/extern-diff-internal-name/Makefile |
40 | 39 | run-make/extern-flag-disambiguates/Makefile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
1 | +// Invalid paths passed to rustc used to cause internal compilation errors | |
2 | +// alongside an obscure error message. This was turned into a standard error, | |
3 | +// and this test checks that the cleaner error message is printed instead. | |
4 | +// See https://github.com/rust-lang/rust/issues/13517 | |
5 | + | |
6 | +use run_make_support::rustc; | |
7 | + | |
8 | +// NOTE: This cannot be a UI test due to the --out-dir flag, which is | |
9 | +// already present by default in UI testing. | |
10 | + | |
11 | +fn main() { | |
12 | +let out = rustc().input("foo.rs").emit("dep-info").out_dir("foo/bar/baz").run_fail(); | |
13 | +// The error message should be informative. | |
14 | + out.assert_stderr_contains("error writing dependencies"); | |
15 | +// The filename should appear. | |
16 | + out.assert_stderr_contains("baz"); | |
17 | +} |