diff options
Diffstat (limited to 'libgo/go/archive/tar/tar_test.go')
-rw-r--r-- | libgo/go/archive/tar/tar_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/archive/tar/tar_test.go b/libgo/go/archive/tar/tar_test.go index 616a9cc57e..ed333f3ea4 100644 --- a/libgo/go/archive/tar/tar_test.go +++ b/libgo/go/archive/tar/tar_test.go @@ -36,6 +36,10 @@ func TestFileInfoHeader(t *testing.T) { if g, e := h.ModTime, fi.ModTime(); !g.Equal(e) { t.Errorf("ModTime = %v; want %v", g, e) } + // FileInfoHeader should error when passing nil FileInfo + if _, err := FileInfoHeader(nil, ""); err == nil { + t.Fatalf("Expected error when passing nil to FileInfoHeader") + } } func TestFileInfoHeaderDir(t *testing.T) { |