test: fix -a and -o

Closes #413.

Seeing as I can't trust the tests, I would appreciate it if someone else would verify that this works correctly.