From 09af0517bcf7d6ee41804c8a048b04bd4feefdd7 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 15 Mar 2023 08:58:52 +0100 Subject: [PATCH] Rename test file --- tests/example_input_file.txt | 1 + tests/example_stdin_data | 1 - tests/integration_tests.rs | 8 +++----- 3 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 tests/example_input_file.txt delete mode 100644 tests/example_stdin_data diff --git a/tests/example_input_file.txt b/tests/example_input_file.txt new file mode 100644 index 0000000..0d924b8 --- /dev/null +++ b/tests/example_input_file.txt @@ -0,0 +1 @@ +This text is part of a file diff --git a/tests/example_stdin_data b/tests/example_stdin_data deleted file mode 100644 index 2483820..0000000 --- a/tests/example_stdin_data +++ /dev/null @@ -1 +0,0 @@ -This data is passed to the command via stdin diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index ab8d028..0e8113f 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -216,17 +216,15 @@ fn runs_commands_using_user_defined_shell() { } #[test] -fn can_pass_file_data_to_command_via_stdin() { +fn can_pass_input_to_command_from_a_file() { hyperfine() .arg("--runs=1") - .arg("--input=example_stdin_data") + .arg("--input=example_input_file.txt") .arg("--show-output") .arg("cat") .assert() .success() - .stdout(predicate::str::contains( - "This data is passed to the command via stdin", - )); + .stdout(predicate::str::contains("This text is part of a file")); } #[test]