my $query = shift;
# Unfortunately, the canonical representation of a query in master
# as of 2012/09/07 is not unambiguous
- is($QParser->parse_tree()->to_abstract_query()->{children}->{'&'}, undef, "Outer-most operator in query {$query} is not AND");
- is(ref $QParser->parse_tree()->to_abstract_query()->{children}->{'|'}, 'ARRAY', "Outer-most operator in query {$query} is OR");
+ is(ref $QParser->parse_tree()->to_abstract_query()->{children}->{'&'}, 'ARRAY', "Outer-most operator in query {$query} is not AND");
+ is($QParser->parse_tree()->to_abstract_query()->{children}->{'|'}, undef, "Outer-most operator in query {$query} is OR");
},
'keyword1 keyword2 && keyword3 keyword4' => undef,
'keyword1 author:keyword2' => undef,
},
'(keyword1 keyword2) || keyword3 #available' => sub {
my $query = shift;
- is($QParser->parse_tree->to_abstract_query()->{modifiers}->[0], 'available', 'Set modifier for query');
+ is($QParser->parse_tree->to_abstract_query()->{children}->{'&'}->[0]->{children}->{'|'}->[1]->{modifiers}->[0], 'available', 'Set modifier for query');
},
'keyword1 testfilter(whatever)' => undef,
'keyword1 sort:something' => undef,