Skip to content

rustdoc splits test-args wrongly #39789

Open
@malbarbo

Description

@malbarbo

rustdoc is splitting test-args using split_whitespace, it should use something like shlex.

After the output of rusdoc testing changes, it is not possible to run a specific test anymore. For example, consider a x.rs file:

/// ```
/// assert!(true);
/// ```
fn f() { }

With stable compiler (1.15.1), this run the test

rustdoc +stable x.rs --test --test-args --exact --test-args "f_0"

With nightly compiler (1.17.0-nightly (ba7cf7c 2017-02-11)), this does not run the test

rustdoc +nightly x.rs --test --test-args --exact --test-args "x.rs - line 1"

Note that I'm taking the test name using rustdoc +stable x.rs --test --test-args --list

It would be great if something like rustdoc +nightly x.rs --test --test-args '--exact "x.rs - line 1"' worked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions