Closed epa closed 8 years ago
ack visits files in whatever order the OS gives to it. If you want a defined order, use --sort.
Yes, I thought as much; but how does that interact with test cases where we run ack over several files and expect the results in a defined order? So ack-w.t for example runs 'ack -w -h pattern t/text'. If ack visits the files under t/text in the 'wrong' order then the test will fail, unless I'm missing something?
That's probably true, and probably we should explicitly add --sort to tests that rely on that order.
OK I will send a second pull request with that fix. If you want to apply that first, I'm happy to redo the earlier one.
Sorry the 'expected' output ended up in the wrong order (has ack's order of visiting files in a directory changed perhaps?). Please close this and I will send a corrected pull request.