Skip to content

Commit c297c3e

Browse files
authored
test: Fixed arg order in rustdoc json test (#16968)
While rebasing #16807 I notice a new test was added in #16773 that passes `-Zbuild-dir-new-layout` but the test is `assert`ing the old layout. Which I was initially quite confused by. After investigating I realized it was due to `-Z` flags being before and after the command. ``` cargo -Zbuild-dir-new-layout <command> -Zunstable-options ``` Moving the `-Zunstable-options` before the command fixes the issue. (moving `-Zbuild-dir-new-layout` after the command also works) Not quite sure if this is a bug or just initiative behavior. I do not see it documented in https://doc.rust-lang.org/cargo/reference/unstable.html so if its expected I think it might be worth documenting. Maybe related: #15589
2 parents 230e325 + d21263a commit c297c3e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/testsuite/build_dir.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ fn cargo_rustdoc_json_should_output_to_target_dir() {
521521
)
522522
.build();
523523

524-
p.cargo("-Zbuild-dir-new-layout rustdoc -Zunstable-options --output-format json")
524+
p.cargo("-Zbuild-dir-new-layout -Zunstable-options rustdoc --output-format json")
525525
.masquerade_as_nightly_cargo(&["new build-dir layout", "rustdoc-output-format"])
526526
.enable_mac_dsym()
527527
.run();
@@ -537,10 +537,10 @@ fn cargo_rustdoc_json_should_output_to_target_dir() {
537537
[ROOT]/foo/build-dir/.rustdoc_fingerprint.json
538538
[ROOT]/foo/build-dir/CACHEDIR.TAG
539539
[ROOT]/foo/build-dir/debug/.cargo-build-lock
540-
[ROOT]/foo/build-dir/debug/.fingerprint/foo-[HASH]/doc-lib-foo
541-
[ROOT]/foo/build-dir/debug/.fingerprint/foo-[HASH]/doc-lib-foo.json
542-
[ROOT]/foo/build-dir/debug/.fingerprint/foo-[HASH]/invoked.timestamp
543-
[ROOT]/foo/build-dir/debug/build/foo-[HASH]/out/foo.json
540+
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/fingerprint/doc-lib-foo
541+
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/fingerprint/doc-lib-foo.json
542+
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/fingerprint/invoked.timestamp
543+
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/out/foo.json
544544
545545
"#
546546
]);

0 commit comments

Comments
 (0)