(t *testing.T)
| 200 | } |
| 201 | |
| 202 | func TestFSReaderNested(t *testing.T) { |
| 203 | data := test.Random(55, 1<<18+588) |
| 204 | now := time.Now() |
| 205 | filename := "foo/sub/bar" |
| 206 | |
| 207 | tests := createReadDirTest("", "foo") |
| 208 | tests = append(tests, createReadDirTest("foo", "sub")...) |
| 209 | tests = append(tests, createReadDirTest("foo/sub", "bar")...) |
| 210 | tests = append(tests, createFileTest(filename, now, data)...) |
| 211 | tests = append(tests, createDirTest("", now)...) |
| 212 | tests = append(tests, createDirTest("foo", now)...) |
| 213 | tests = append(tests, createDirTest("foo/sub", now)...) |
| 214 | |
| 215 | for _, tst := range tests { |
| 216 | fs, err := NewReader(filename, io.NopCloser(bytes.NewReader(data)), ReaderOptions{ |
| 217 | Mode: 0644, |
| 218 | Size: int64(len(data)), |
| 219 | ModTime: now, |
| 220 | }) |
| 221 | test.OK(t, err) |
| 222 | |
| 223 | t.Run(tst.name, func(t *testing.T) { |
| 224 | tst.f(t, fs) |
| 225 | }) |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | func TestFSReaderDir(t *testing.T) { |
| 230 | data := test.Random(55, 1<<18+588) |
nothing calls this directly
no test coverage detected