blob: ee4cb67053bbad85b122c829d7b47ffbcf463b45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright 2017 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
package osutil
import (
"os"
"testing"
)
func TestIsExist(t *testing.T) {
if f := os.Args[0]; !IsExist(f) {
t.Fatalf("executable %v does not exist", f)
}
if f := os.Args[0] + "-foo-bar-buz"; IsExist(f) {
t.Fatalf("file %v exists", f)
}
}
|