From e4790ab4417fc0546752dcbe6310ba97f500cb05 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 15 Mar 2023 09:12:14 +0100 Subject: [PATCH] Change error message --- src/error.rs | 2 +- tests/integration_tests.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/error.rs b/src/error.rs index 2e6d279..53d39a5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -53,6 +53,6 @@ pub enum OptionsError<'a> { ShellParseError(shell_words::ParseError), #[error("Unknown output policy '{0}'. Use './{0}' to output to a file named '{0}'.")] UnknownOutputPolicy(String), - #[error("File containing stdin data '{0}' does not exist")] + #[error("The file '{0}' specified as '--input' does not exist")] StdinDataFileDoesNotExist(String), } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 0e8113f..eb57656 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -231,13 +231,13 @@ fn can_pass_input_to_command_from_a_file() { fn fails_if_invalid_stdin_data_file_provided() { hyperfine() .arg("--runs=1") - .arg("--input=example_stdin_data_invalid") + .arg("--input=example_non_existent_file.txt") .arg("--show-output") .arg("cat") .assert() .failure() .stderr(predicate::str::contains( - "File containing stdin data 'example_stdin_data_invalid' does not exist", + "The file 'example_non_existent_file.txt' specified as '--input' does not exist", )); }