@@ -177,19 +177,32 @@ func TestIdentityDetectorLoadPeopleDict(t *testing.T) {
177177 id := fixtureIdentityDetector ()
178178 err := id .LoadPeopleDict (path .Join (".." , ".." , "test_data" , "identities" ))
179179 assert .Nil (t , err )
180- assert .Equal (t , len (id .PeopleDict ), 7 )
180+ assert .Equal (t , len (id .PeopleDict ), 10 )
181181 assert .Contains (t , id .PeopleDict , "linus torvalds" )
182182 assert .Contains (t , id .PeopleDict , "torvalds@linux-foundation.org" )
183183 assert .Contains (t , id .PeopleDict , "vadim markovtsev" )
184184 assert .Contains (t , id .PeopleDict , "vadim@sourced.tech" )
185185 assert .Contains (t , id .PeopleDict , "another@one.com" )
186186 assert .Contains (t , id .PeopleDict , "máximo cuadros" )
187187 assert .Contains (t , id .PeopleDict , "maximo@sourced.tech" )
188- assert .Equal (t , len (id .ReversedPeopleDict ), 4 )
188+ assert .Contains (t , id .PeopleDict , "duplicate" )
189+ assert .Contains (t , id .PeopleDict , "first@example.com" )
190+ assert .Contains (t , id .PeopleDict , "second@example.com" )
191+
192+ assert .Equal (t , len (id .ReversedPeopleDict ), 5 )
189193 assert .Equal (t , id .ReversedPeopleDict [0 ], "Linus Torvalds" )
190194 assert .Equal (t , id .ReversedPeopleDict [1 ], "Vadim Markovtsev" )
191195 assert .Equal (t , id .ReversedPeopleDict [2 ], "Máximo Cuadros" )
192- assert .Equal (t , id .ReversedPeopleDict [3 ], AuthorMissingName )
196+ assert .Equal (t , id .ReversedPeopleDict [3 ], "Duplicate" )
197+ assert .Equal (t , id .ReversedPeopleDict [4 ], AuthorMissingName )
198+
199+ assert .Equal (t , id .PeopleDict ["duplicate" ], id .PeopleDict ["first@example.com" ])
200+ assert .Equal (t , id .PeopleDict ["duplicate" ], id .PeopleDict ["second@example.com" ])
201+
202+ assert .Equal (t , id .PeopleDict ["vadim markovtsev" ], id .PeopleDict ["vadim@sourced.tech" ])
203+ assert .Equal (t , id .PeopleDict ["vadim markovtsev" ], id .PeopleDict ["another@one.com" ])
204+
205+ assert .NotEqual (t , id .PeopleDict ["duplicate" ], id .PeopleDict ["vadim markovtsev" ])
193206}
194207
195208func TestIdentityDetectorLoadPeopleDictWrongPath (t * testing.T ) {
0 commit comments