add tests for `perm`