(t *testing.T)
| 333 | } |
| 334 | |
| 335 | func TestFileInfoRealPathUsesScopedFsRealPath(t *testing.T) { |
| 336 | root := t.TempDir() |
| 337 | file := &FileInfo{ |
| 338 | Fs: NewScopedFs(afero.NewOsFs(), root), |
| 339 | Path: "/root/downloads", |
| 340 | } |
| 341 | |
| 342 | got := file.RealPath() |
| 343 | want := filepath.Join(root, "root", "downloads") |
| 344 | if got != want { |
| 345 | t.Fatalf("got %q, want %q", got, want) |
| 346 | } |
| 347 | } |
nothing calls this directly
no test coverage detected