mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Merge pull request #19324 from nicolo-ribaudo/search-dash-date
Allow searching for number-number on two lines
This commit is contained in:
commit
711bf2bd12
2 changed files with 78 additions and 30 deletions
|
@ -1104,6 +1104,40 @@ describe("pdf_find_controller", function () {
|
|||
});
|
||||
});
|
||||
|
||||
it("performs a search with a dash between two digits", async () => {
|
||||
const { eventBus, pdfFindController } = await initPdfFindController();
|
||||
|
||||
await testSearch({
|
||||
eventBus,
|
||||
pdfFindController,
|
||||
state: {
|
||||
query: "2008-02",
|
||||
},
|
||||
matchesPerPage: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
|
||||
selectedMatch: {
|
||||
pageIndex: 13,
|
||||
matchIndex: 0,
|
||||
},
|
||||
pageMatches: [[], [], [], [], [], [], [], [], [], [], [], [], [], [314]],
|
||||
pageMatchesLength: [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[7],
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
describe("custom matcher", () => {
|
||||
it("calls to the matcher with the right arguments", async () => {
|
||||
const QUERY = "Foo bar";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue