diff options
author | David Peter <sharkdp@users.noreply.github.com> | 2023-03-15 08:58:52 +0100 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2023-03-15 09:33:49 +0100 |
commit | 09af0517bcf7d6ee41804c8a048b04bd4feefdd7 (patch) | |
tree | d4be8566ed8a1170749893060a3c8b429d3e728d | |
parent | d32b90ee5c86005e6a78be6834de752b1d1bfacd (diff) |
Rename test file
-rw-r--r-- | tests/example_input_file.txt | 1 | ||||
-rw-r--r-- | tests/example_stdin_data | 1 | ||||
-rw-r--r-- | tests/integration_tests.rs | 8 |
3 files changed, 4 insertions, 6 deletions
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] |