rust: Add support for doctest runnables (#24806)
Screenshot:  I would be happy to add tests if you point me to the right place to do it please. Release Notes: - Added support for doc test in tasks for Rust --------- Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
d45aaa1745
commit
dff47a8436
2 changed files with 61 additions and 1 deletions
|
@ -577,6 +577,26 @@ impl ContextProvider for RustContextProvider {
|
|||
cwd: Some("$ZED_DIRNAME".to_owned()),
|
||||
..TaskTemplate::default()
|
||||
},
|
||||
TaskTemplate {
|
||||
label: format!(
|
||||
"DocTest '{}' (package: {})",
|
||||
VariableName::Symbol.template_value(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
),
|
||||
command: "cargo".into(),
|
||||
args: vec![
|
||||
"test".into(),
|
||||
"--doc".into(),
|
||||
"-p".into(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
VariableName::Symbol.template_value(),
|
||||
"--".into(),
|
||||
"--nocapture".into(),
|
||||
],
|
||||
tags: vec!["rust-doc-test".to_owned()],
|
||||
cwd: Some("$ZED_DIRNAME".to_owned()),
|
||||
..TaskTemplate::default()
|
||||
},
|
||||
TaskTemplate {
|
||||
label: format!(
|
||||
"Test '{}' (package: {})",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue