-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2669 from Maformatiker/master
Fixed issue #2652
- Loading branch information
Showing
5 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,6 @@ | |
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/** | ||
* @author Christopher Oezbek <[email protected]> | ||
* @version 0.1 - Still fails for stuff in AuthorList that is ambiguous | ||
* @see AuthorList Class tested. | ||
*/ | ||
public class AuthorListTest { | ||
|
||
@SuppressWarnings("unused") | ||
|
@@ -646,4 +641,22 @@ public void parseNameWithBraces() throws Exception { | |
Assert.assertEquals(new AuthorList(expected), AuthorList.parse("H{e}lene Fiaux")); | ||
} | ||
|
||
/** | ||
* This tests the issue described at https://github.com/JabRef/jabref/pull/2669#issuecomment-288519458 | ||
*/ | ||
@Test | ||
public void correctNamesWithOneComma() throws Exception { | ||
Author expected = new Author("Alexander der Große", "A. d. G.", null, "Canon der Barbar", null); | ||
Assert.assertEquals(new AuthorList(expected), AuthorList.parse("Canon der Barbar, Alexander der Große")); | ||
|
||
expected = new Author("Alexander H. G.", "A. H. G.", null, "Rinnooy Kan", null); | ||
Assert.assertEquals(new AuthorList(expected), AuthorList.parse("Rinnooy Kan, Alexander H. G.")); | ||
|
||
expected = new Author("Alexander Hendrik George", "A. H. G.", null, "Rinnooy Kan", null); | ||
Assert.assertEquals(new AuthorList(expected), AuthorList.parse("Rinnooy Kan, Alexander Hendrik George")); | ||
|
||
expected = new Author("José María", "J. M.", null, "Rodriguez Fernandez", null); | ||
Assert.assertEquals(new AuthorList(expected), AuthorList.parse("Rodriguez Fernandez, José María")); | ||
} | ||
|
||
} |