(t *testing.T)
| 29 | ) |
| 30 | |
| 31 | func TestGetFileType(t *testing.T) { |
| 32 | var tests = []struct { |
| 33 | filename string |
| 34 | opts uint32 |
| 35 | wants FileType |
| 36 | }{ |
| 37 | { |
| 38 | `_fixtures`, |
| 39 | 16777249, |
| 40 | Directory, |
| 41 | }, |
| 42 | { |
| 43 | `_fixtures`, |
| 44 | 25165857, |
| 45 | Directory, |
| 46 | }, |
| 47 | { |
| 48 | `C:\Users\bunny\AppData\Local\Mozilla\Firefox\Profiles\profile1.tmp`, |
| 49 | 18874368, |
| 50 | Regular, |
| 51 | }, |
| 52 | } |
| 53 | |
| 54 | for _, tt := range tests { |
| 55 | t.Run(tt.filename, func(t *testing.T) { |
| 56 | assert.Equal(t, tt.wants, GetFileType(tt.filename, tt.opts)) |
| 57 | }) |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | func TestGetFileInfo(t *testing.T) { |
| 62 | var tests = []struct { |
nothing calls this directly
no test coverage detected