Tests for ack -w

5 views
Skip to first unread message

Andy Lester

unread,
Mar 7, 2017, 5:18:00 PM3/7/17
to ack development
I've created a new form of test file for ack2, which we will also use over on ack3 eventually. For now, I'm taking the test data that I wrote up for ack3 and looking to see if we can use it to iron out the ack -w problems.

ack -w REGEX should effectively be ack -w \b(?:REGEX)\b, so that ack 'foot?' should match foo and foot but not football.

I'm working on the "word" branch in ack2 project. There are two key files in there.

t/barfly/dash-w.txt contains the rules. It looks like this (ignore the YESLINES sections)

BEGIN -w and optional group
RUN
ack -w foo(bar)?

YES
foo
foobar

NO
Trampled underfoot
foobarf
foo-bar
foo-bart

END

Then the test at t/w.t runs the tests defined in dash-w.txt to check the -w behavior.

Ed: From what I see, the failures that are failing are things that are bugs in how we handle -w. What effect do your changes have on the passing of t/w.t?

All: Please don't bother critiquing t/w.t at this point. It's ugly and thrown together.

Thanks!
Andy

--
Andy Lester => www.petdance.com

Reply all
Reply to author
Forward
0 new messages