Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix possible output message truncation (#332) #333

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ All user visible changes to `cucumber` crate will be documented in this file. Th
- Removed `#[async_trait]` attribute from `World`, `Writer` and `writer::Arbitrary` traits. ([#324])
- Bumped up [MSRV] to 1.75 for using `async fn` in traits. ([#324])

### Fixed

- Possible truncation of long output messages. ([#333], [#332])

[#324]: /../../pull/324
[#332]: /../../issues/332
[#333]: /../../pull/333



Expand Down Expand Up @@ -327,7 +333,7 @@ All user visible changes to `cucumber` crate will be documented in this file. Th
- `FeatureExt::count_steps()` method. ([#220])
- Location of the `fn` matching a failed `Step` in output. ([#221])
- Ability to retry failed `Scenario`s. ([#223], [#212])
- `--retry`, `--retry-after` and `--retry-tag-filter` CLI options. ([#223], [#212])
- `--retry`, `--retry-after` and `--retry-tag-filter` CLI options. ([#223], [#212])

### Changed

Expand Down Expand Up @@ -461,7 +467,7 @@ All user visible changes to `cucumber` crate will be documented in this file. Th
### Changed

- Optimized `runner::Basic` to not wait the whole batch to complete before executing next `Scenario`s. ([#195])

[#195]: /../../pull/195
[#196]: /../../pull/196

Expand All @@ -484,9 +490,9 @@ All user visible changes to `cucumber` crate will be documented in this file. Th
- Switched CLI to [`clap`] from `structopt`. ([#188], [#155])
- Reworked `verbose` CLI option of `writer::Basic`: ([#193], [#192])
- Removed long form.
- Made `-v` default behavior (no additional output).
- Made `-vv` additionally output `World` on failed steps.
- Made `-vvv` additionally output docstrings (old behavior).
- Made `-v` default behavior (no additional output).
- Made `-vv` additionally output `World` on failed steps.
- Made `-vvv` additionally output docstrings (old behavior).

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/writer/out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub trait WriteStrExt: io::Write {
///
/// If this writer fails to write the given `string`.
fn write_str(&mut self, string: impl AsRef<str>) -> io::Result<()> {
self.write(string.as_ref().as_bytes()).map(drop)
self.write_all(string.as_ref().as_bytes())
}

/// Writes the given `string` into this writer followed by a newline.
Expand Down