The new -w is done. Please help think of corner cases.

13 views
Skip to first unread message

Andy Lester

unread,
Apr 1, 2017, 2:19:50 PM4/1/17
to ack development
I have finished the code for -w on the dev branch in ack3.

I created a new file format called barfly that is for making it easy to run many variations of the same code and regex on different test cases.  In the example below, all three command lines in the RUN section get tested on the NO, YES and YESLINES sections below.  The NO and YES just say what matches and what doesn't.  The YESLINES shows lines that should match, and what parts of the line that should be highlighted.  (The ^^^^^ is generated by the new --underline flag)

BEGIN -w and optional character
RUN
ack -w foot?
ack -w (foot?)
ack -w (?:foot?)

NO
Trampled underfoot
football
foolish

YES
foo
foot
foo-bar
foot-bar

YESLINES
foo
^^^

By the foot
       ^^^^
       
I pity da foo'.
          ^^^
          
Our ten-foot foo-bird is foobar.
        ^^^^ ^^^
END

Everyone: Can you please take a look at the t/ack-w.barfly file (which gets handled by t/ack-w.t) and see if you can come up with other test cases that we should add?  Things that we need to check for that are weird corner cases?  Ed Avis, I'm looking at you especially, please, since you and Bill have dug up the most corner cases in the past.

Thanks,
Andy

--
Andy Lester => www.petdance.com

Reply all
Reply to author
Forward
0 new messages