Add test for failed_returncodes

When kept_returncodes or repaired_returncodes are specified
failed_returncode is not defaulted properly.