Skip to content

Commit

Permalink
Allow revisions for compile-time stdin, just like with runtime stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 16, 2023
1 parent 8ed1b5e commit 3d262a2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ui_test"
version = "0.21.0"
version = "0.21.1"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "A test framework for testing rustc diagnostics output"
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,11 @@ impl dyn TestStatus {

let mut cmd = build_command(path, &config, revision, comments)?;
cmd.args(&extra_args);
let stdin = path.with_extension("stdin");
let stdin = path.with_extension(if revision.is_empty() {
"stdin".into()
} else {
format!("{revision}.stdin")
});
if stdin.exists() {
cmd.stdin(std::fs::File::open(stdin).unwrap());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/basic-bin/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic-fail-mode/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic-fail/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/cargo-run/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d262a2

Please sign in to comment.