1
0
mirror of https://github.com/securego/gosec.git synced 2025-01-22 03:09:59 +02:00
gosec/rules/fileperms_test.go

16 lines
381 B
Go
Raw Normal View History

package rules
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("modeIsSubset", func() {
It("it compares modes correctly", func() {
Expect(modeIsSubset(0o600, 0o600)).To(BeTrue())
Expect(modeIsSubset(0o400, 0o600)).To(BeTrue())
Expect(modeIsSubset(0o644, 0o600)).To(BeFalse())
Expect(modeIsSubset(0o466, 0o600)).To(BeFalse())
})
})