(t *testing.T)
| 542 | } |
| 543 | |
| 544 | func TestIssue3164(t *testing.T) { |
| 545 | _, f := setupSendReceiveFolder(t) |
| 546 | ffs := f.Filesystem() |
| 547 | |
| 548 | ignDir := filepath.Join("issue3164", "oktodelete") |
| 549 | subDir := filepath.Join(ignDir, "foobar") |
| 550 | must(t, ffs.MkdirAll(subDir, 0o777)) |
| 551 | must(t, fs.WriteFile(ffs, filepath.Join(subDir, "file"), []byte("Hello"), 0o644)) |
| 552 | must(t, fs.WriteFile(ffs, filepath.Join(ignDir, "file"), []byte("Hello"), 0o644)) |
| 553 | file := protocol.FileInfo{ |
| 554 | Name: "issue3164", |
| 555 | } |
| 556 | |
| 557 | must(t, f.scanSubdirs(t.Context(), nil)) |
| 558 | |
| 559 | matcher := ignore.New(ffs) |
| 560 | must(t, matcher.Parse(bytes.NewBufferString("(?d)oktodelete"), "")) |
| 561 | f.ignores = matcher |
| 562 | |
| 563 | dbUpdateChan := make(chan dbUpdateJob, 1) |
| 564 | |
| 565 | f.deleteDir(file, dbUpdateChan, make(chan string)) |
| 566 | |
| 567 | if _, err := ffs.Stat("issue3164"); !fs.IsNotExist(err) { |
| 568 | t.Fatal(err) |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | func TestDiff(t *testing.T) { |
| 573 | for i, test := range diffTestData { |
nothing calls this directly
no test coverage detected