summaryrefslogtreecommitdiff
path: root/tests/specs/mod.rs
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2024-09-18 12:15:13 -0700
committerGitHub <noreply@github.com>2024-09-18 21:15:13 +0200
commita1d0a427e807959666a6b23ae015e4e04659abf5 (patch)
treec588767979d1f7ded1830d042f737774b23addf6 /tests/specs/mod.rs
parent7a41a939972b701e96cb70cbf0516595fefcae02 (diff)
feat: default to TS for file extension and support ext flag in more scenarios (#25472)
Closes #11220 Currently does lint, fmt, and repl
Diffstat (limited to 'tests/specs/mod.rs')
-rw-r--r--tests/specs/mod.rs5
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);