Skip to content

Instantly share code, notes, and snippets.

@scorphus
Created August 7, 2014 17:58
Show Gist options
  • Save scorphus/434caada5f6d4716203f to your computer and use it in GitHub Desktop.
Save scorphus/434caada5f6d4716203f to your computer and use it in GitHub Desktop.
multipartzip_test.go
// Copyright 2014 gandalf authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package multipartzip
import (
"fmt"
"io/ioutil"
"launchpad.net/gocheck"
"testing"
)
func Test(t *testing.T) { gocheck.TestingT(t) }
type S struct {
tmpdir string
}
var _ = gocheck.Suite(&S{})
func (s *S) TestExtractZipIntegration(c *gocheck.C) {
outDir, err := ioutil.TempDir("", "TestExtractZipIntegration")
c.Assert(err, gocheck.IsNil)
fmt.Println(outDir)
var files = []struct {
Name, Body string
}{
{"doge.txt", "Much doge"},
{"much.txt", "Much mucho"},
{"WOW/WOW.WOW", "WOW\nWOW"},
}
buf, err := CreateZipBuffer(files)
c.Assert(err, gocheck.IsNil)
c.Assert(buf, gocheck.NotNil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment