File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 11use bstr:: ByteSlice ;
22use gix_actor:: Identity ;
3+ use winnow:: stream:: AsBStr ;
34
45#[ test]
56fn round_trip ( ) -> gix_testtools:: Result {
@@ -40,12 +41,9 @@ fn lenient_parsing() -> gix_testtools::Result {
4041 ) ;
4142 let signature: Identity = identity. into ( ) ;
4243 let mut output = Vec :: new ( ) ;
43- let result = signature. write_to ( & mut output) ;
44-
45- // Both test cases should now work since angle brackets are allowed
46- // and the parser strips newlines from the input
47- assert ! ( result. is_ok( ) ,
48- "angle brackets should be allowed for round-tripping, and newlines are stripped during parsing" ) ;
44+ signature. write_to ( & mut output) . expect ( "write does not complain" ) ;
45+
46+ assert_eq ! ( output. as_bstr( ) , input, "round-tripping should keep these equivalent" ) ;
4947 }
5048 Ok ( ( ) )
5149}
You can’t perform that action at this time.
0 commit comments