diff options
| author | Edward Shen <code@eddie.sh> | 2024-06-09 10:17:21 -0700 |
|---|---|---|
| committer | Edward Shen <code@eddie.sh> | 2024-06-09 10:34:54 -0700 |
| commit | d9f78cb7939b340f72389fbaedfa4d872d0bbe43 (patch) | |
| tree | ecec62b566c18a2c9694b329dfe3fa62d39689a7 /tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs | |
| parent | 212841e17cce13d1e29b00ad144300b687bfafdd (diff) | |
| download | rust-d9f78cb7939b340f72389fbaedfa4d872d0bbe43.tar.gz rust-d9f78cb7939b340f72389fbaedfa4d872d0bbe43.zip | |
rustdoc: Add support for --remap-path-prefix
Adds --remap-path-prefix as an unstable option. This is implemented to mimic the behavior of rustc's --remap-path-prefix but with minor adjustments. This flag similarly takes in two paths, a prefix to replace and a replacement string.
Diffstat (limited to 'tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs')
| -rw-r--r-- | tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs new file mode 100644 index 00000000000..2b220370d77 --- /dev/null +++ b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs @@ -0,0 +1,14 @@ +// FIXME: if/when the output of the test harness can be tested on its own, this test should be +// adapted to use that, and that normalize line can go away + +//@ failure-status: 101 +//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1 +//@ rustc-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout-test "exit (status|code): 101" -> "exit status: 101" + +// doctest fails at runtime +/// ``` +/// panic!("oh no"); +/// ``` +pub struct SomeStruct; |
