1 // +build linux freebsd
10 // TestLstat tests Lstat for existing and non existing files
11 func TestLstat(t *testing.T) {
12 file, invalid, _, dir := prepareFiles(t)
13 defer os.RemoveAll(dir)
15 statFile, err := Lstat(file)
20 t.Fatal("returned empty stat for existing file")
23 statInvalid, err := Lstat(invalid)
25 t.Fatal("did not return error for non-existing file")
27 if statInvalid != nil {
28 t.Fatal("returned non-nil stat for non-existing file")