Skip to content

Commit

Permalink
Fix possible truncation of long output messages (#333, #332)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilslv authored Apr 22, 2024
1 parent 210dc19 commit eaf9351
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
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

0 comments on commit eaf9351

Please sign in to comment.