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

Leftovers: Gaming

Today in Techrights

Snapcraft 2.12 Coming Soon to Ubuntu 16.04, Lets You Access the Parts Ecosystem

The development of Snapcraft, the handy Ubuntu utility that lets you create Snaps for your applications, which you can now distribute across multiple operating systems, is advancing at a fast pace, and it looks like Snapcraft 2.12 will land soon. Read more

GeckoLinux 421.160627.0 "Static" Editions Released Based on openSUSE Leap 42.1

Users of the GeckoLinux distribution are in for yet another treat after the announcement of updated GeckoLinux 421.160623.0 "Rolling" Editions based on the latest openSUSE Tumbleweed snapshots. Read more