File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,22 @@ fn round_trip() -> gix_testtools::Result {
2222
2323#[ test]
2424fn lenient_parsing ( ) -> gix_testtools:: Result {
25- for input in [
26- "First Last<<fl <First Last<fl@openoffice.org >> >" ,
27- "First Last<fl <First Last<fl@openoffice.org>>\n " ,
25+ for ( input, expected_email) in [
26+ (
27+ "First Last<<fl <First Last<fl@openoffice.org >> >" ,
28+ "fl <First Last<fl@openoffice.org >> " ,
29+ ) ,
30+ (
31+ "First Last<fl <First Last<fl@openoffice.org>>\n " ,
32+ "fl <First Last<fl@openoffice.org" ,
33+ ) ,
2834 ] {
2935 let identity = gix_actor:: IdentityRef :: from_bytes :: < ( ) > ( input. as_bytes ( ) ) . unwrap ( ) ;
3036 assert_eq ! ( identity. name, "First Last" ) ;
37+ assert_eq ! (
38+ identity. email, expected_email,
39+ "emails are parsed but left as is for round-tripping"
40+ ) ;
3141 let signature: Identity = identity. into ( ) ;
3242 let mut output = Vec :: new ( ) ;
3343 let err = signature. write_to ( & mut output) . unwrap_err ( ) ;
You can’t perform that action at this time.
0 commit comments