test that `sort` is nondestructive