Add a basic stringToUTF16HexString
unit-test
This commit is contained in:
parent
9adc7859c8
commit
7d029f8bfe
@ -23,6 +23,7 @@ import {
|
||||
isWhiteSpace,
|
||||
log2,
|
||||
parseXFAPath,
|
||||
stringToUTF16HexString,
|
||||
stringToUTF16String,
|
||||
toRomanNumerals,
|
||||
validateCSSFont,
|
||||
@ -355,6 +356,18 @@ describe("core_utils", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("stringToUTF16HexString", function () {
|
||||
it("should encode a string in UTF16 hexadecimal format", function () {
|
||||
expect(stringToUTF16HexString("hello world")).toEqual(
|
||||
"00680065006c006c006f00200077006f0072006c0064"
|
||||
);
|
||||
|
||||
expect(stringToUTF16HexString("こんにちは世界の")).toEqual(
|
||||
"30533093306b3061306f4e16754c306e"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("stringToUTF16String", function () {
|
||||
it("should encode a string in UTF16", function () {
|
||||
expect(stringToUTF16String("hello world")).toEqual(
|
||||
|
Loading…
x
Reference in New Issue
Block a user