beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 140 forks source link

Document and test current semantics of -w. #560

Closed epa closed 8 years ago

epa commented 8 years ago

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.

petdance commented 8 years ago

ack visits files in whatever order the OS gives to it. If you want a defined order, use --sort.

epa commented 8 years ago

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?

petdance commented 8 years ago

That's probably true, and probably we should explicitly add --sort to tests that rely on that order.

epa commented 8 years ago

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.