jonas-p / go-shp

Go library for reading and writing ESRI Shapefiles. Pure Golang implementation based on the ESRI Shapefile technical description.
MIT License
258 stars 68 forks source link

func TestZipReader(t *testing.T) {} #8

Closed gertcuykens closed 7 years ago

gertcuykens commented 7 years ago

Out of the box TestZipReader doens't seem to be working


--- FAIL: TestZipReader (0.01s)
        zipreader_test.go:75: Testing zipped reading for test_files/polyline
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/polyline read was wrong. Wanted 2, got 1.
        zipreader_test.go:75: Testing zipped reading for test_files/multipoint
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/multipoint read was wrong. Wanted 1, got 0.
        zipreader_test.go:75: Testing zipped reading for test_files/polylinez
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/polylinez read was wrong. Wanted 2, got 1.
        zipreader_test.go:75: Testing zipped reading for test_files/multipatch
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/multipatch read was wrong. Wanted 1, got 0.
        zipreader_test.go:75: Testing zipped reading for test_files/polygonz
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/polygonz read was wrong. Wanted 1, got 0.
        zipreader_test.go:75: Testing zipped reading for test_files/polylinem
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/polylinem read was wrong. Wanted 2, got 1.
        zipreader_test.go:75: Testing zipped reading for test_files/polygonm
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/polygonm read was wrong. Wanted 1, got 0.
        zipreader_test.go:75: Testing zipped reading for test_files/point
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/point read was wrong. Wanted 3, got 2.
        zipreader_test.go:75: Testing zipped reading for test_files/pointz
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/pointz read was wrong. Wanted 3, got 2.
        zipreader_test.go:75: Testing zipped reading for test_files/multipointz
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/multipointz read was wrong. Wanted 1, got 0.
        zipreader_test.go:75: Testing zipped reading for test_files/multipointm
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/multipointm read was wrong. Wanted 1, got 0.
        zipreader_test.go:75: Testing zipped reading for test_files/polygon
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/polygon read was wrong. Wanted 1, got 0.
        zipreader_test.go:75: Testing zipped reading for test_files/pointm
        zipreader_test.go:64: Error when iterating over the shapes: Error while reading next shape: EOF
        reader_test.go:220: Number of shapes for test_files/pointm read was wrong. Wanted 3, got 2.
FAIL
exit status 1
FAIL    github.com/gertcuykens/go-shp   0.029s
%```
fawick commented 7 years ago

Hi, I'm the bloke who contributed TestZipReader. I just found out about this issue (no idea why I did not get a notification from Github before) and am looking into it.

fawick commented 7 years ago

The test passes when using Go 1.6.2 or 1.6.3 (which is what I used when writing all of that in summer 2016) and starts failing with Go 1.7.

I need to defer further investigation to a later point in time, but my gut feeling is that we are looking at a regression bug in Go.

fawick commented 7 years ago

Okay, the culprit is this commit: https://github.com/golang/go/commit/c27efce66bce7534dbb357ac1779bbc08395b267

I'll come up with a fix for this package soon.

gertcuykens commented 7 years ago

Can their be more admins added to this repo please so changes can be merged if owner has abandoned the project?

jonas-p commented 7 years ago

I'd love some more admins. @fawick would you be interested?

fawick commented 7 years ago

Sure, why not.