mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-03 14:58:18 +00:00
Share application adapter and diagnostic helpers
This commit is contained in:
1 parent
4027417bf5
commit
b9dcb0d4c7
26 files changed
+937
-305
No files matched your search
@@ -70,6 +70,21 @@ Deno.test("CLI file operations: push / cat / ls / info / rm / resolve / cat-rev
|
||||
console.log("[PASS] push/cat roundtrip matched");
|
||||
});
|
||||
|
||||
await t.step("push/pull binary roundtrip", async () => {
|
||||
const source = workDir.join("binary-source.bin");
|
||||
const restored = workDir.join("binary-restored.bin");
|
||||
const remotePath = "test/blob-roundtrip.bin";
|
||||
const content = Uint8Array.from({ length: 1025 }, (_, index) => index % 256);
|
||||
await Deno.writeFile(source, content);
|
||||
|
||||
await run("push", source, remotePath);
|
||||
await run("pull", remotePath, restored);
|
||||
|
||||
assertEquals(await Deno.readFile(restored), content, "Binary push/pull must preserve every byte");
|
||||
const info = JSON.parse(await run("info", remotePath));
|
||||
assertEquals(info.size, content.byteLength, "Binary Metadata must retain the original byte length");
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ls: single file
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user