Add anchor order test.

Anchors should be emitted in ascending order.