Testsuite: add --test and --range options