Skip to content

Commit

Permalink
add TestChmod
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Sep 25, 2024
1 parent 909c6a3 commit 51bf3ce
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions filei_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,17 @@ func TestSize(t *testing.T) {
t.Fatal("Size() error data must have 13 files")
}
}

func TestChmod(t *testing.T) {
filePath := "testdata/text.txt"

err := Chmod(filePath, 0700)
if err != nil {
t.Errorf("Chmod() error = %v", err)
}

err = Chmod("wrong path", 0700)
if err == nil {
t.Errorf("Chmod() error data must have a value")
}
}

0 comments on commit 51bf3ce

Please sign in to comment.