cucumber-rs / cucumber

Cucumber testing framework for Rust. Fully native, no external test runners or dependencies.
https://cucumber-rs.github.io/cucumber/main
Apache License 2.0
563 stars 69 forks source link

assert custom message max string length #332

Closed makcedward closed 4 months ago

makcedward commented 4 months ago

Recently, I have been trying to debug a failure case with a custom message. I noticed that it cannot print out all the messages if the string value is more than around 1000 (or 1024) characters.

I tested assert! without cucumber, and it was able to print out more than 1000 (or 1024) characters. I am curious about whether there are some limitations or additional configurations that could be affecting the printing of longer strings.

let msg = "abcdefghij";
assert!(false, "{}", msg.repeat(110));
ilslv commented 4 months ago

Thanks for reporting this! I've managed to pin down the issue and fix it https://github.com/cucumber-rs/cucumber/pull/333

tyranron commented 4 months ago

@makcedward fixed in 0.21.0.