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

Android Leftovers

Tizen Samsung Z1, made in India and soon to be available in Bangladesh

As we have reported Samsung has been sending the parts for its Samsung Z1 SM-Z130H/DS to be assembled at its Noida plant in India, which has the capacity to produce over 4 million handsets per month. The Samsung Z1 was launched in India as the first Tizen based commercial handset at a competitive price of 5,700 INR. Read more

Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon

The Linux kernel is one of the most important components in a distribution and Ubuntu users are interested to know what will be used in the stable edition for the 15.04 branch, which is scheduled to arrive in a couple of months. Read more

Locally Integrated Menus Can Be Set to Always Show in Ubuntu 15.04

The development cycle for Ubuntu 15.04 still have a couple of months left and the guys and gals from Canonical are making good progress. An important improvement regarding the use of menus in the title bar has been implemented and it will be part of the stable edition that will launch in April. Read more