diff options
| author | EtomicBomb <ethan@ethan.ws> | 2024-08-20 23:34:19 +0000 |
|---|---|---|
| committer | ethan <ethan@localhost.localdomain> | 2024-09-07 18:59:01 -0400 |
| commit | 2e1cba64157c9bf60f7bc010268ac0bd5ca9438c (patch) | |
| tree | 559ba4e87e79ca379b827496a0bcc61ef34637df /src/librustdoc/html/render/write_shared | |
| parent | 3782251c2c6e6e7fedb806a97664ee38ced1677b (diff) | |
| download | rust-2e1cba64157c9bf60f7bc010268ac0bd5ca9438c.tar.gz rust-2e1cba64157c9bf60f7bc010268ac0bd5ca9438c.zip | |
rfc#3662 changes under unstable flags
* All new functionality is under unstable options * Adds `--merge=shared|none|finalize` flags * Adds `--parts-out-dir=<crate specific directory>` for `--merge=none` to write cross-crate info file for a single crate * Adds `--include-parts-dir=<previously specified directory>` for `--merge=finalize` to write cross-crate info files * update tests/run-make/rustdoc-default-output/rmake.rs golden
Diffstat (limited to 'src/librustdoc/html/render/write_shared')
| -rw-r--r-- | src/librustdoc/html/render/write_shared/tests.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/librustdoc/html/render/write_shared/tests.rs b/src/librustdoc/html/render/write_shared/tests.rs index e282cd99e43..a235f1d3724 100644 --- a/src/librustdoc/html/render/write_shared/tests.rs +++ b/src/librustdoc/html/render/write_shared/tests.rs @@ -1,3 +1,4 @@ +use crate::config::ShouldMerge; use crate::html::render::ordered_json::{EscapedJson, OrderedJson}; use crate::html::render::sorted_template::{Html, SortedTemplate}; use crate::html::render::write_shared::*; @@ -192,16 +193,17 @@ fn read_template_test() { let path = path.path().join("file.html"); let make_blank = || SortedTemplate::<Html>::from_before_after("<div>", "</div>"); - let template = read_template_or_blank(make_blank, &path).unwrap(); + let should_merge = ShouldMerge { read_rendered_cci: true, write_rendered_cci: true }; + let template = read_template_or_blank(make_blank, &path, &should_merge).unwrap(); assert_eq!(but_last_line(&template.to_string()), "<div></div>"); fs::write(&path, template.to_string()).unwrap(); - let mut template = read_template_or_blank(make_blank, &path).unwrap(); + let mut template = read_template_or_blank(make_blank, &path, &should_merge).unwrap(); template.append("<img/>".to_string()); fs::write(&path, template.to_string()).unwrap(); - let mut template = read_template_or_blank(make_blank, &path).unwrap(); + let mut template = read_template_or_blank(make_blank, &path, &should_merge).unwrap(); template.append("<br/>".to_string()); fs::write(&path, template.to_string()).unwrap(); - let template = read_template_or_blank(make_blank, &path).unwrap(); + let template = read_template_or_blank(make_blank, &path, &should_merge).unwrap(); assert_eq!(but_last_line(&template.to_string()), "<div><br/><img/></div>"); } |
