fix(zip): use zipinfo to preflight zip extraction on unix
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from "bun:test"
|
||||
|
||||
import { parseZipInfoListedEntry } from "./zipinfo-zip-entry-listing"
|
||||
|
||||
describe("parseZipInfoListedEntry", () => {
|
||||
describe("#given a zipinfo listing line with trailing filename whitespace", () => {
|
||||
it("#when parsing the line #then preserves the original trailing whitespace", () => {
|
||||
// given
|
||||
const listedLine =
|
||||
"-rw-a-- 2.0 fat 4 b- defN 03-Apr-26 12:34 trailing-space.txt "
|
||||
|
||||
// when
|
||||
const parsedEntry = parseZipInfoListedEntry(listedLine)
|
||||
|
||||
// then
|
||||
expect(parsedEntry).toEqual({
|
||||
path: "trailing-space.txt ",
|
||||
type: "file",
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user