Skip to content

Commit

Permalink
add TestExistsFile
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Sep 24, 2024
1 parent 66c47d2 commit a16a9f3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions filei_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,16 @@ func TestCreateFile(t *testing.T) {
t.Errorf("CreateFile() error = %v", err)
}
}

func TestExistsFile(t *testing.T) {
isExists := Exists("testdata/text.txt") // Must be true

if isExists != true {
t.Error("Exists() error data must be true")
}

isNotExists := Exists("wrong path") // Must be false
if isNotExists != false {
t.Error("Exists() error data must be false")
}
}

0 comments on commit a16a9f3

Please # to comment.