Please let me suggest once again a reading of How to ask better questions using Test::More and sample data. What I and some other monks would like to see is something like:
This can integrate easily into a Test::More testing framework. Individual test cases should be as short as possible and should always be paired with exact expected output. Degenerate and trivial cases, e.g.,my @Tests = ( [ 'The largest (4 quart{16 cups}) will hold most of a bag of flour +.', # input string 'The largest will hold most of a bag of flour.', + # expected output ], [ 'I {mistakenly} did not recieve my order (it was a different ord +er), and they rushed me another.', 'I did not recieve my order, and they rushed me another.', ], [ 'Company is good because of: (1) quick service, (2) product rang +e.', 'Company is good because of: (1) quick service, (2) product rang +e.', 'parenthesized ordinals untouched', # optional comment ], [ '...', '...', ], # another test case ... # more test cases );
What I, for one, do not like to see is an invitation to do a lot of work to generate test case input for which I must also guess the correct output; that's your job.
Give a man a fish: <%-{-{-{-<
In reply to Re^4: bracket processing
by AnomalousMonk
in thread bracket processing
by rajaman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |