mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Follow-up of pr #12344
This commit is contained in:
parent
e51e9d1f33
commit
64a6efd95e
9 changed files with 69 additions and 56 deletions
|
@ -18,6 +18,7 @@ import {
|
|||
getInheritableProperty,
|
||||
isWhiteSpace,
|
||||
log2,
|
||||
parseXFAPath,
|
||||
toRomanNumerals,
|
||||
} from "../../src/core/core_utils.js";
|
||||
import { XRefMock } from "./test_utils.js";
|
||||
|
@ -211,4 +212,18 @@ describe("core_utils", function () {
|
|||
expect(isWhiteSpace(undefined)).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("parseXFAPath", function () {
|
||||
it("should get a correctly parsed path", function () {
|
||||
const path = "foo.bar[12].oof[3].rab.FOO[123].BAR[456]";
|
||||
expect(parseXFAPath(path)).toEqual([
|
||||
{ name: "foo", pos: 0 },
|
||||
{ name: "bar", pos: 12 },
|
||||
{ name: "oof", pos: 3 },
|
||||
{ name: "rab", pos: 0 },
|
||||
{ name: "FOO", pos: 123 },
|
||||
{ name: "BAR", pos: 456 },
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue