Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.623.415 Times

Test::Simple 0.70

  Date Added: April 24, 2010  |  Visits: 759

Test::Simple

Report Broken Link
Printer Friendly Version


Product Homepage
Download (75 downloads)



Test::Simple is a Perl module with basic utilities for writing tests. SYNOPSIS use Test::Simple tests => 1; ok( $foo eq $bar, foo is bar ); ** If you are unfamiliar with testing read Test::Tutorial first! ** This is an extremely simple, extremely basic module for writing tests suitable for CPAN modules and other pursuits. If you wish to do more complicated testing, use the Test::More module (a drop-in replacement for this one). The basic unit of Perl testing is the ok. For each thing you want to test your program will print out an "ok" or "not ok" to indicate pass or fail. You do this with the ok() function (see below). The only other constraint is you must pre-declare how many tests you plan to run. This is in case something goes horribly wrong during the test and your test program aborts, or skips a test or whatever. You do this like so: use Test::Simple tests => 23; You must have a plan. ok ok( $foo eq $bar, $name ); ok( $foo eq $bar ); ok() is given an expression (in this case $foo eq $bar). If its true, the test passed. If its false, it didnt. Thats about it. ok() prints out either "ok" or "not ok" along with a test number (it keeps track of that for you). # This produces "ok 1 - Hell not yet frozen over" (or not ok) ok( get_temperature($hell) > 0, Hell not yet frozen over ); If you provide a $name, that will be printed along with the "ok/not ok" to make it easier to find your test when if fails (just search for the name). It also makes it easier for the next guy to understand what your test is for. Its highly recommended you use test names. All tests are run in scalar context. So this: ok( @stuff, I have some stuff ); will do what you mean (fail if stuff is empty) Test::Simple will start by printing number of tests run in the form "1..M" (so "1..5" means youre going to run 5 tests). This strange format lets Test::Harness know how many tests you plan on running in case something goes horribly wrong. If all your tests passed, Test::Simple will exit with zero (which is normal). If anything failed it will exit with how many failed. If you run less (or more) tests than you planned, the missing (or extras) will be considered failures. If no tests were ever run Test::Simple will throw a warning and exit with 255. If the test died, even after having successfully completed all its tests, it will still be considered a failure and will exit with 255. So the exit codes are... 0 all tests successful 255 test died or all passed but wrong # of tests run any other number how many failed (including missing or extras) If you fail more than 254 tests, it will be reported as 254. This module is by no means trying to be a complete testing system. Its just to get you started. Once youre off the ground its recommended you look at Test::More..

Requirements: No special requirements
Platforms: Linux
Keyword: Basic How Many Libraries Module Perl Perl Module Programming Test Tests Testsimple Writing
Users rating: 0/10

License: Freeware Size: 77.82 KB
USER REVIEWS
More Reviews or Write Review


TEST::SIMPLE RELATED
Entertainment  -  Football Logo Quiz 1.0.0.0
Play the fun game of Football/Soccer logo quiz! How many of soccer teams can you recognize? Test yourself how good you are as a football fans, try to guess as more logos as you can! Requirements: Windows Phone 8.1, Windows Phone 8, Windows...
5 MB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Module::Build::TestReporter 1.00
Module::Build::TestReporter is a Perl module to help users report test failures. SYNOPSIS use Module::Build::TestReporter; my $build = Module::Build::TestReporter->new( # normal Module::Build code here ); # or, in your own M::B subclass...
8.19 KB  
Libraries  -  XML::Grove 0.46 Alpha
XML::Grove is a Perl module with Perl-style XML objects. SYNOPSIS use XML::Grove; # Basic parsing and grove building use XML::Grove::Builder; use XML::Parser::PerlSAX; $grove_builder = XML::Grove::Builder->new; $parser =...
27.65 KB  
Libraries  -  Test::LectroTest 0.3500
Test::LectroTest is a Perl module with easy, automatic, specification-based tests. SYNOPSIS #!/usr/bin/perl -w use MyModule; # contains code we want to test use Test::LectroTest; Property { ##[ x <- Int, y <- Int ]##...
54.27 KB  
Libraries  -  B::Lint 1.09
B::Lint module contains Perl lint. SYNOPSIS perl -MO=Lint[,OPTIONS] foo.pl The B::Lint module is equivalent to an extended version of the -w option of perl. It is named after the program lint which carries out a similar process for C...
17.41 KB  
Libraries  -  SyslogScan::Summary 0.32
SyslogScan::Summary encapsulates a tally of how many bytes people have sent and received through sendmail. SYNOPSIS Use SyslogScan::Summary; Use SyslogScan::DeliveryIterator; my $iter = new SyslogScan::DeliveryIterator(syslogList =>...
37.89 KB  
Networking Tools  -  BlockHosts 2.0.5
BlockHosts is a script to record how many times "sshd" or "proftpd" is being attacked, and when a particular IP address exceeds a configured number of failed login attempts, that IP address is added to /etc/hosts.allow (or optionally to any other...
38.91 KB  
Network & Internet  -  Calorie Burning Calculator 2.1
Calorie Burning Calculator project is a free, nicely-formatted online calculator to help your web site visitors calculate how many calories they require a day to maintain their body weight, or basal metabolic rate (BMR)..
25.6 KB  
Modules  -  Flickr API 5.x-1.x-dev 1.0
You don't need this module unless another module requires it or you want to develop a new Flickr-based module.To use this module a Flickr API key is required.InstallationUnpack in your modules folder (usually /sites/all/modules/) and enable under...
 
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB