diff options
Diffstat (limited to '')
| -rw-r--r-- | tests/protocol.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/protocol.rs b/tests/protocol.rs index 2962574..bf8a4fd 100644 --- a/tests/protocol.rs +++ b/tests/protocol.rs | |||
| @@ -40,8 +40,14 @@ fn reads_multiple_lines_from_a_reader() { | |||
| 40 | let mut buffer = LineBuffer::new(); | 40 | let mut buffer = LineBuffer::new(); |
| 41 | let mut reader = Cursor::new(b"one\ntwo\n".to_vec()); | 41 | let mut reader = Cursor::new(b"one\ntwo\n".to_vec()); |
| 42 | 42 | ||
| 43 | assert_eq!(buffer.read_line(&mut reader).unwrap().as_deref(), Some("one")); | 43 | assert_eq!( |
| 44 | assert_eq!(buffer.read_line(&mut reader).unwrap().as_deref(), Some("two")); | 44 | buffer.read_line(&mut reader).unwrap().as_deref(), |
| 45 | Some("one") | ||
| 46 | ); | ||
| 47 | assert_eq!( | ||
| 48 | buffer.read_line(&mut reader).unwrap().as_deref(), | ||
| 49 | Some("two") | ||
| 50 | ); | ||
| 45 | assert_eq!(buffer.read_line(&mut reader).unwrap(), None); | 51 | assert_eq!(buffer.read_line(&mut reader).unwrap(), None); |
| 46 | } | 52 | } |
| 47 | 53 | ||
