mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Add new config use_path_based_img_url
Fix parseBitInt
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user