diff options
Diffstat (limited to 'tests/specs/mod.rs')
-rw-r--r-- | tests/specs/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/specs/mod.rs b/tests/specs/mod.rs index 9565aa71f..34221dd9d 100644 --- a/tests/specs/mod.rs +++ b/tests/specs/mod.rs @@ -176,6 +176,7 @@ struct StepMetaData { pub command_name: Option<String>, #[serde(default)] pub envs: HashMap<String, String>, + pub input: Option<String>, pub output: String, #[serde(default)] pub exit_code: i32, @@ -406,6 +407,10 @@ fn run_step( true => command.show_output(), false => command, }; + let command = match &step.input { + Some(input) => command.stdin_text(input), + None => command, + }; let output = command.run(); if step.output.ends_with(".out") { let test_output_path = cwd.join(&step.output); |