diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-13 10:11:09 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-13 10:11:09 -0500 |
commit | 0cc8739ddeae110620316fab5225bf6e1787dd3d (patch) | |
tree | 558c646e3c092735ae7f85e767af020188682f12 /tests | |
parent | 8dfc9648c161e11a0cebd22e44452413cf3f8788 (diff) | |
download | textmode-0cc8739ddeae110620316fab5225bf6e1787dd3d.tar.gz textmode-0cc8739ddeae110620316fab5225bf6e1787dd3d.zip |
try harder to make utf8 strings when requested
Diffstat (limited to 'tests')
-rw-r--r-- | tests/input.rs | 52 |
1 files changed, 14 insertions, 38 deletions
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!( |