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:

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 );
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.,
    ''  ' '  '()'  ' ()'  '() '  'x'  'foo'  etc, etc...
should also be given. (Update: If exceptions may be thrown, a test case or cases should ultimately be written for each exception; see Test::Exception.) Note that this is work you will have to do anyway because you must always build a testing framework for any serious project you undertake!

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.