Added test code to verify list_sort.