Skip to content

Commit

Permalink
test quoted filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Sep 20, 2020
1 parent 6f8aaff commit 3f6c8b7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/ReadTask.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from "path"
import { ExifDateTime } from "./ExifDateTime"
import { ExifTool } from "./ExifTool"
import { exiftool, ExifTool } from "./ExifTool"
import { ReadTask } from "./ReadTask"
import { Tags } from "./Tags"
import { expect } from "./_chai.spec"
Expand Down Expand Up @@ -257,4 +257,19 @@ describe("ReadTask", () => {
expect(t.UppercaseBaseName).to.eql("PIXEL")
})
})

describe("quotes in filenames", () => {
after(() => exiftool.end())
const base = `it's a "file".jpg`
it("reads from " + base, async () => {
const t = await exiftool.read(`test/${base}`)
expect(t.FileName).to.eql(base)
expect(t.MIMEType).to.eql("image/jpeg")
expect(t.ImageDescription).to.eql("image description for quotes test")
expect(t.Keywords).to.eql("quotes")
expect(t.DateTimeOriginal?.toString()?.split(/000/)[0]).to.eql(
"2016-08-12T13:28:50."
)
})
})
})
Binary file added test/it's a "file".jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3f6c8b7

Please sign in to comment.