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 {
22
22
23
23
#[ test]
24
24
fn 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
+ ) ,
28
34
] {
29
35
let identity = gix_actor:: IdentityRef :: from_bytes :: < ( ) > ( input. as_bytes ( ) ) . unwrap ( ) ;
30
36
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
+ ) ;
31
41
let signature: Identity = identity. into ( ) ;
32
42
let mut output = Vec :: new ( ) ;
33
43
let err = signature. write_to ( & mut output) . unwrap_err ( ) ;
You can’t perform that action at this time.
0 commit comments