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]