Comment on [Bug] Boolean lines in contact allowlists with more than one OR don't work

jupiter_rowland@hub.netzgemeinde.eu@hub.netzgemeinde.eu ⁨1⁩ ⁨week⁩ ago

Here are six test cases for your convenience:

            'incl: two criteria with OR, both keywords in the body' => [
                '?body ~= grasshopper || ?body ~= summer',
                '',
                true
            ],
            'incl: three criteria with OR, all keywords in the body' => [
                '?body ~= grasshopper || ?body ~= summer || ?body ~= ant',
                '',
                true
            ],
            'incl: three criteria with OR, one keyword in the body, one check if the item is public, one check if the item is not a comment' => [
                '?body ~= grasshopper || ?item_private == 0 || ?item_thread_top > 0',
                '',
                true
            ],
            'incl: two criteria with OR, both keywords in the body; excl: item must not be a repeat' => [
                '?body ~= grasshopper || ?body ~= summer',
                '?verb == Announce',
                true
            ],
            'incl: three criteria with OR, all keywords in the body; excl: item must not be a repeat' => [
                '?body ~= grasshopper || ?body ~= summer || ?body ~= ant',
                '?verb == Announce',
                true
            ],
            'incl: three criteria with OR, one keyword in the body, one check if the item is public, one check if the item is not a comment; excl: item must not be a repeat' => [
                '?body ~= grasshopper || ?item_private == 0 || ?item_thread_top > 0',
                '?verb == Announce',
                true
            ],

As of now, due to the bug, only the first and the fourth test case will pass because they only have two criteria linked with || in incl. The second, third, fifth and sixth one will fail because they've got more than two criteria linked with || in incl.

original
Sort:hotnewtop