test: fix -a and -o by using operator precedence