#!/bin/sh . ./Common ############################################################################### tst "hierarchical sort with one hole" <next = p2d_new(); p2d_append(p, v2d_new(2, 2)); p2d_append(p, v2d_new(2, 8)); p2d_append(p, v2d_new(18, 8)); p2d_append(p, v2d_new(18, 2)); p2d_close(p); print_hier(p2d_hsort(pl)); EOF expect <next = p2d_new(); p2d_append(p, v2d_new(2, 2)); p2d_append(p, v2d_new(4, 2)); p2d_append(p, v2d_new(4, 4)); p2d_close(p); p = p->next = p2d_new(); p2d_append(p, v2d_new(6, 2)); p2d_append(p, v2d_new(8, 2)); p2d_append(p, v2d_new(8, 8)); p2d_close(p); print_hier(p2d_hsort(pl)); EOF expect <next = p2d_new(); p2d_append(p, v2d_new(2, 2)); p2d_append(p, v2d_new(8, 2)); p2d_append(p, v2d_new(8, 8)); p2d_close(p); p = p->next = p2d_new(); p2d_append(p, v2d_new(3, 3)); p2d_append(p, v2d_new(7, 3)); p2d_append(p, v2d_new(7, 7)); p2d_close(p); print_hier(p2d_hsort(pl)); EOF expect <