Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Commit

Permalink
exif: Add failing test for issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
xor-gate committed Nov 2, 2017
1 parent 429ded3 commit 29aee26
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions exif/exif_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,30 @@ func TestMarshal(t *testing.T) {
t.Logf("%s", b)
}

func TestMarshalIssue10(t *testing.T) {
name := "samples/2009-08-05-08-11-31-sep-2009-08-05-08-11-31a.jpg"
f, err := os.Open(name)
if err != nil {
t.Fatalf("%v\n", err)
}
defer f.Close()

x, err := Decode(f)
if err != nil {
t.Fatal(err)
}
if x == nil {
t.Fatal("bad err")
}

b, err := x.MarshalJSON()
if err != nil {
t.Fatal(err)
}

t.Logf("%s", b)
}

func testSingleParseDegreesString(t *testing.T, s string, w float64) {
g, err := parseTagDegreesString(s)
if err != nil {
Expand Down

0 comments on commit 29aee26

Please sign in to comment.