@@ -599,6 +599,10 @@ def _run_check(self):
599599 category = "eet" ,
600600 event = True )
601601 try :
602+ summary = "Simple event with a start time and"
603+ ## Text search with and without comptype
604+ tswc = cal .search (summary = summary , event = True , post_filter = False )
605+ tswoc = cal .search (summary = summary , post_filter = False )
602606 ## Testing if search without comp-type filter returns both events and tasks
603607 if self .feature_checked ("search.time-range.todo" ):
604608 objects = cal .search (
@@ -608,7 +612,7 @@ def _run_check(self):
608612 )
609613 else :
610614 objects = _filter_2000 (cal .search (post_filter = False ))
611- if len (objects ) == 0 :
615+ if len (objects ) == 0 and not tswoc :
612616 self .set_feature (
613617 "search.comp-type-optional" ,
614618 {
@@ -635,7 +639,8 @@ def _run_check(self):
635639 post_filter = False ,
636640 )
637641 )
638- == self .checker .cnt
642+ == self .checker .cnt and
643+ (tswoc or not tswc )
639644 ):
640645 self .set_feature (
641646 "search.comp-type-optional" ,
@@ -644,7 +649,7 @@ def _run_check(self):
644649 "description" : "comp-filter is redundant in search as a calendar can only hold one kind of components" ,
645650 },
646651 )
647- elif len (objects ) == self .checker .cnt :
652+ elif len (objects ) == self .checker .cnt and ( tswoc or not tswc ) :
648653 self .set_feature ("search.comp-type-optional" )
649654 else :
650655 ## TODO ... we need to do more testing on search to conclude certainly on this one. But at least we get something out.
0 commit comments