When a query has partial sorting it would be nice to write expected result file which could support that (without modification for queries).
See below example:
SELECT a, b FROM T ORDER by A;
and result file:
--- delimiter: |, orderBy: 1
A | 1
A | 3
A | 2
A | 4
A | 5
B | 2