diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-03-27 14:54:49 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-03-27 14:54:49 +0100 |
commit | 5b8d50fc8b0929f758639089bb1186222cd21955 (patch) | |
tree | 1ff5f20e77dc8ee909813a65958ad2a0f2677d90 /librsync/librsync_test.go | |
parent | 10232b56dda085fafd7566b1dbb548d8438ea78b (diff) | |
download | golibrsync-5b8d50fc8b0929f758639089bb1186222cd21955.tar.gz golibrsync-5b8d50fc8b0929f758639089bb1186222cd21955.tar.bz2 golibrsync-5b8d50fc8b0929f758639089bb1186222cd21955.zip |
Added some helper functions.
These should make things more convenient (e.g. no need to Close() all the
objects)
Diffstat (limited to 'librsync/librsync_test.go')
-rw-r--r-- | librsync/librsync_test.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/librsync/librsync_test.go b/librsync/librsync_test.go index e0fd50f..256e344 100644 --- a/librsync/librsync_test.go +++ b/librsync/librsync_test.go @@ -2,28 +2,11 @@ package librsync import ( "bytes" - "fmt" "github.com/kch42/golibrsync/librsync/testdata" "io" - "os" "testing" ) -func dump(r io.Reader) (string, error) { - path := fmt.Sprintf("%s%cgolibrsync_test", os.TempDir(), os.PathSeparator) - file, err := os.Create(path) - if err != nil { - return "", err - } - defer file.Close() - - if _, err = io.Copy(file, r); err != nil { - return "", err - } - - return path, nil -} - func TestSignatureDeltaPatch(t *testing.T) { // Generate signature orig := bytes.NewReader(testdata.RandomData()) |