test sorting in ex2, but without input or globals