Language Selection

English French German Italian Portuguese Spanish

Writing Perl test cases

Filed under
HowTos

If you've ever automated any operations with Perl you'll most likely have written a small script or two, and then left them to run. But how do you know that your code is correct? The answer is to write some test cases and verify they perform correctly. With Perls test facilities this is a simple thing to do.

Most large Perl projects have a test suite, and so do many of the common modules you'll have installed.

To get started we'll look at a simple example. Suppose your script uses some non-standard Perl modules that suggests the very first test you write should verify that those are available. That way if you attempt to run the program upon a new host you'll immediately know whether you need to install these non-standard modules.

Full Article.

More in Tux Machines

The Machine with Open Source Carbon OS is the Next Big Thing – if HP can deliver

HP has recently been facing some serious difficulties and has opted to betting all its resources on the new PC called ‘The Machine’. Probably the most intriguing thing about the machine is that it will rewrite basic computing on a very fundamental level. While the topic has been covered extensively, I realized we haven’t actually touched it here and thought it was about time. Read more

YEAR of the PENGUIN: A Linux mobile in 2015?

It's nearly impossible to sum up an entire year of developments in something as large and nebulous as the world of desktop Linux, especially in a year like this one which has seen some the best releases that projects like Mint, Fedora and openSUSE have put out to date. At the same time the distro that's closest to being a household name, Ubuntu, has been nearly silent since 14.04 arrived in April. To paraphrase author Charles Dickens, the past year of Linux releases has been both the best of times and the worst of times. At the very moment that Linux desktops seem to be reaching new levels of sophistication, polish and "just works" ease-of-use, the entire future of the desktop computer (by which I also mean laptop) feels in doubt. Read more

Jolla's Sailfish OS Update 10 Is Now Available

The tenth update to Jolla's Sailfish mobile operating system is now available. This update is version 1.1.1.26 and is codenamed Vaarainjärvi. Read more

Forget Google's robot cars, now it's on to ANDROID cars

Google is planning a big push into in-car infotainment systems with an upcoming version of Android, sources claim. "Android M" – the version to come after the current Android 5.0 "Lollipop" – will be available in a formulation designed specifically to run cars' built-in screens, Reuters reports, citing anonymous insiders with knowledge of the plan. Google made its first advances toward the automotive world at its I/O developer conference earlier this year, when it unveiled its Android Auto software. The first Android Auto–compatible cars are expected to arrive early next year. Read more