| 1 | // Excluded from plan9 (no fsnotify support). |
| 2 | //go:build !plan9 |
| 3 | |
| 4 | package main |
| 5 | |
| 6 | import ( |
| 7 | "testing" |
| 8 | |
| 9 | "github.com/stretchr/testify/require" |
| 10 | ) |
| 11 | |
| 12 | func TestIsHidden(t *testing.T) { |
| 13 | require.True(t, IsHidden("bar/.git"), "dirs beginning with . should be recognized as hidden") |
| 14 | require.False(t, IsHidden("."), ". for current dir should not be considered hidden") |
| 15 | require.False(t, IsHidden("bar/baz"), "normal dirs should not be hidden") |
| 16 | } |