aboutsummaryrefslogtreecommitdiff
path: root/librsync/librsync_test.go
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-03-27 14:54:49 +0100
committerKevin Chabowski <kevin@kch42.de>2013-03-27 14:54:49 +0100
commit5b8d50fc8b0929f758639089bb1186222cd21955 (patch)
tree1ff5f20e77dc8ee909813a65958ad2a0f2677d90 /librsync/librsync_test.go
parent10232b56dda085fafd7566b1dbb548d8438ea78b (diff)
downloadgolibrsync-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.go17
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())