getopts: unify tests