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(file source): correct an error with line aggregation in continue_through
and halt_before
#3262
Conversation
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
… formatting Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic of the change looks good, would just like to see a little more comprehensive tests.
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
… test - two_lines_emit_with_halt_before had hard to grasp example, which resulted in incorrect semantics, and effective a *wrong test*; the test samples were rewritten to ensure - added more sample for the stashing logic tests, and hinted which test lines are going to be stashed for easier correspondence of the test logic with the code Signed-off-by: MOZGIII <mike-n@narod.ru>
@@ -293,6 +293,7 @@ fn add_next_line(buffered: &mut BytesMut, line: Bytes) { | |||
#[cfg(test)] | |||
mod tests { | |||
use super::*; | |||
use pretty_assertions::assert_eq; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I'll have to remember that one for my own tests. Too badd we can't turn that on across all the sources at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed it being used at the file/mod.rs
and it looked really good.
Can't we import it at /lib.rs
with an old #[macro_use] extern crate pretty_assertions;
?
…_through` and `halt_before` (vectordotdev#3262) * Hint which data is where Signed-off-by: MOZGIII <mike-n@narod.ru> * Add real life test case Signed-off-by: MOZGIII <mike-n@narod.ru> * Fix the issue with emitting multiple lines Signed-off-by: MOZGIII <mike-n@narod.ru> * Rename real_life_use_case_1 into two_lines_emit_with_continue_through Signed-off-by: MOZGIII <mike-n@narod.ru> * Adjust the samples at two_lines_emit_with_continue_through for better formatting Signed-off-by: MOZGIII <mike-n@narod.ru> * Add a two_lines_emit_with_halt_before test Signed-off-by: MOZGIII <mike-n@narod.ru> * Fix an issue with emitting two messages at HaltBefore mode Signed-off-by: MOZGIII <mike-n@narod.ru> * Add a comment on debug_assert Signed-off-by: MOZGIII <mike-n@narod.ru> * Use pretty_assertions Signed-off-by: MOZGIII <mike-n@narod.ru> * Fix another set of bugs and corrected two_lines_emit_with_halt_before test - two_lines_emit_with_halt_before had hard to grasp example, which resulted in incorrect semantics, and effective a *wrong test*; the test samples were rewritten to ensure - added more sample for the stashing logic tests, and hinted which test lines are going to be stashed for easier correspondence of the test logic with the code Signed-off-by: MOZGIII <mike-n@narod.ru> Signed-off-by: Brian Menges <brian.menges@anaplan.com>
Closes #3237.