Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: RFC: How did I do writing my first test?

by jcb (Parson)
on Sep 24, 2020 at 22:30 UTC ( [id://11122175]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: How did I do writing my first test?
in thread RFC: How did I do writing my first test?

Testing the final newline presence/absence is still beneficial to ensure that the code stays agnostic to it. Further, if the code handles those cases differently, testing that processing is needed for code coverage.

  • Comment on Re^2: RFC: How did I do writing my first test?

Replies are listed 'Best First'.
Re^3: RFC: How did I do writing my first test?
by Arunbear (Prior) on Sep 25, 2020 at 13:17 UTC
    I'm not sure ... (on closer inspection of what it does) that seems like basically retesting Perl's readline function, which is already tested elsewhere.

      I would offer that such testing is still reasonable, to ensure that the behavior does not change if/when some future version implements more complex wrapping around readline.

      If the high-level specification says that the code behaves "like so" with/without a final newline, the testsuite should verify that, even if it is effectively verifying part of perl itself in the current implementation. If nothing else, this will blow up if some future perl changes that behavior, alerting to the need to either add code to maintain the previous behavior or revise the specification.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11122175]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2024-04-18 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found