From 0cc8739ddeae110620316fab5225bf6e1787dd3d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 13 Mar 2021 10:11:09 -0500 Subject: try harder to make utf8 strings when requested --- tests/input.rs | 52 ++++++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 38 deletions(-) (limited to 'tests') diff --git a/tests/input.rs b/tests/input.rs index 79aaea7..b1607bf 100644 --- a/tests/input.rs +++ b/tests/input.rs @@ -144,44 +144,20 @@ fn run_input_test( } } else { if utf8 { - // assert_eq!( - // std::string::String::from_utf8(fixtures::read_line( - // &mut r - // )) - // .unwrap(), - // "Bytes([27]): [27]\r\n" - // ); - // assert_eq!( - // std::string::String::from_utf8(fixtures::read_line( - // &mut r - // )) - // .unwrap(), - // "String(\"[A\"): [91, 65]\r\n" - // ); - if meta { - assert_eq!( - std::string::String::from_utf8( - fixtures::read_line(&mut r) - ) - .unwrap(), - "Bytes([27]): [27]\r\n" - ); - assert_eq!( - std::string::String::from_utf8( - fixtures::read_line(&mut r) - ) - .unwrap(), - "String(\"[A\"): [91, 65]\r\n" - ); - } else { - assert_eq!( - std::string::String::from_utf8( - fixtures::read_line(&mut r) - ) - .unwrap(), - "Bytes([27, 91, 65]): [27, 91, 65]\r\n" - ); - } + assert_eq!( + std::string::String::from_utf8(fixtures::read_line( + &mut r + )) + .unwrap(), + "Bytes([27]): [27]\r\n" + ); + assert_eq!( + std::string::String::from_utf8(fixtures::read_line( + &mut r + )) + .unwrap(), + "String(\"[A\"): [91, 65]\r\n" + ); } else { if meta { assert_eq!( -- cgit v1.2.3-54-g00ecf