test: add OR-joined reminder filter regression test

Verify that OR-joined conditions on the same sub-table still produce
separate EXISTS subqueries and match independently, as expected.
This commit is contained in:
kolaente
2026-02-18 21:56:57 +01:00
parent d1901f46c3
commit a93f6bf160

View File

@@ -1131,6 +1131,18 @@ func TestTaskCollection_ReadAll(t *testing.T) {
want: []*Task{},
wantErr: false,
},
{
name: "filtered reminder dates with OR should match independently",
fields: fields{
Filter: "reminders > '2019-01-01T00:00:00+00:00' || reminders < '2018-09-01T00:00:00+00:00'",
},
args: defaultArgs,
want: []*Task{
task2, // has reminder at 2019-06-01 (> 2019-01-01)
task47, // has reminder at 2019-03-01 (> 2019-01-01) and 2018-08-01 (< 2018-09-01)
},
wantErr: false,
},
{
name: "filter in keyword",
fields: fields{