"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/archive/tar/writer_test.go" between
moby-20.10.7.tar.gz and moby-20.10.8.tar.gz

About: Moby is a framework to assemble specialized container systems (formerly project name Docker; see here to clarify the relationship between the projects).

writer_test.go  (moby-20.10.7):writer_test.go  (moby-20.10.8)
skipping to change at line 12 skipping to change at line 12
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package tar package tar
import ( import (
"bytes" "bytes"
"encoding/hex" "encoding/hex"
"errors" "errors"
"io" "io"
"io/ioutil"
"os" "os"
"path" "path"
"reflect" "reflect"
"sort" "sort"
"strings" "strings"
"testing" "testing"
"testing/iotest" "testing/iotest"
"time" "time"
) )
skipping to change at line 523 skipping to change at line 522
err := tw.Close() err := tw.Close()
if !equalError(err, tf.wantErr) { if !equalError(err, tf.wantErr) {
t.Fatalf("test %d, Close() = %v, want %v", i, err, tf.wantErr) t.Fatalf("test %d, Close() = %v, want %v", i, err, tf.wantErr)
} }
default: default:
t.Fatalf("test %d, unknown test operation : %T", i, tf) t.Fatalf("test %d, unknown test operation : %T", i, tf)
} }
} }
if v.file != "" { if v.file != "" {
want, err := ioutil.ReadFile(v.file) want, err := os.ReadFile(v.file)
if err != nil { if err != nil {
t.Fatalf("ReadFile() = %v, want nil", err ) t.Fatalf("ReadFile() = %v, want nil", err )
} }
got := buf.Bytes() got := buf.Bytes()
if !bytes.Equal(want, got) { if !bytes.Equal(want, got) {
t.Fatalf("incorrect result: (-got +want)\ n%v", bytediff(got, want)) t.Fatalf("incorrect result: (-got +want)\ n%v", bytediff(got, want))
} }
} }
}) })
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)