tests: add basic test for csv formatter (+bugfix: also sort other duplicates by orig criteria)