-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2427: Arxiv fetcher works with prefix #2428
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,14 @@ public void findByEprint() throws IOException { | |
assertEquals(Optional.of(new URL("http://arxiv.org/pdf/1603.06570v1")), finder.findFullText(entry)); | ||
} | ||
|
||
@Test | ||
// Test for https://github.com/JabRef/jabref/issues/2427 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would omit the comment here. It is a test for expected behavior. Doesnt matter which bug/problem it fixed. |
||
public void findByEprintWithPrefix() throws IOException { | ||
entry.setField("eprint", "arXiv:1603.06570"); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty line |
||
assertEquals(Optional.of(new URL("http://arxiv.org/pdf/1603.06570v1")), finder.findFullText(entry)); | ||
} | ||
|
||
@Test | ||
public void findByEprintWithUnknownDOI() throws IOException { | ||
entry.setField("doi", "10.1529/unknown"); | ||
|
@@ -138,6 +146,12 @@ public void searchEntryByIdWith4Digits() throws Exception { | |
assertEquals(Optional.of(sliceTheoremPaper), finder.performSearchById("1405.2249")); | ||
} | ||
|
||
@Test | ||
// Test for https://github.com/JabRef/jabref/issues/2427 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove url |
||
public void searchEntryByIdWith4DigitsAndPrefix() throws Exception { | ||
assertEquals(Optional.of(sliceTheoremPaper), finder.performSearchById("arXiv:1405.2249")); | ||
} | ||
|
||
@Test | ||
public void searchEntryByIdWith5Digits() throws Exception { | ||
assertEquals(Optional.of( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just replace this via a regex?
/arxiv:?/i
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for an ArXivID class, similar to the DOI one which can handle such a case.