Add new config use_path_based_img_url

Fix parseBitInt
This commit is contained in:
2024-06-02 13:33:46 +08:00
parent 329a91e9c0
commit 0ea6da38e4
8 changed files with 119 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import {
compareNum,
filterFilename,
map,
parseBigInt,
promiseState,
PromiseStatus,
sleep,
@@ -37,7 +38,7 @@ Deno.test("promiseState_test", async () => {
});
Deno.test("Pid_Test", async () => {
if (Deno.build.os == "windows") {
if (Deno.build.os == "windows" || Deno.build.os == "linux") {
assertEquals(await check_running(Deno.pid), true);
}
});
@@ -180,3 +181,13 @@ Deno.test("compareNum_test", () => {
11n,
]);
});
Deno.test("parseBigInt_test", () => {
assertEquals(parseBigInt("1.jpg"), 1);
assertEquals(parseBigInt("9007199254740992.png"), 9007199254740992n);
assertEquals(parseBigInt("+3_3"), 3);
assertEquals(parseBigInt("+9007199254740992"), 9007199254740992n);
assertEquals(parseBigInt("-9007199254740992.3"), -9007199254740992n);
assertEquals(parseBigInt("--9007199254740992"), NaN);
assertEquals(parseBigInt("--3"), NaN);
});