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

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

Serving Software Downloads in 956 Categories, Downloaded 50.196.881 Times

Test::Simple 0.70

  Date Added: April 24, 2010  |  Visits: 996

Test::Simple

Report Broken Link
Printer Friendly Version


Product Homepage
Download (92 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
Modules  -  How many orders has customer ordered before 1.1
This addon allows you to see in admin/orders, how many orders customer has done before
 
Desktop Toolbars  -  How Many Days 1.51
Set It and Forget It. That's how How Many Days works. It's a counter program that you only need to deal with once. After that, just enjoy it's elegantly understated convenience. This application puts an automatically updating Days Counter in...
2.09 MB  
Libraries  -  Test::Data 1.20
Test::Data is a Perl module to test functions for particular variable types. SYNOPSIS use Test::Data qw(Scalar Array Hash Function); Test::Data provides utility functions to check properties and values of data and variables. Functions...
8.19 KB  
Libraries  -  Apache::TestTieBucketBrigade 0.03
Apache::TestTieBucketBrigade is a Perl module to test Apache::TieBucketBrigade, takes a bunch of stuff and then writes it back upcased. It tests stuff. I suppose you could use it as an example of building things with Apache::TieBucketBrigade....
4.1 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  
Libraries  -  Inline-API 0.44
Inline-API is a Perl module that teach you how to bind a programming language to Perl using Inline.pm. SYNOPSIS #!/usr/bin/perl use Inline Foo; say_it(foo); # Use Foo to print "Hello, Foo" __Foo__ foo-sub say_it { foo-my $foo =...
91.14 KB  
Libraries  -  Test::WWW::Simple 0.24
Test::WWW::Simple is a Perl module to test Web applications using TAP. SYNOPSIS use Test::WWW::Simple; # This is the default user agent. user_agent(Windows IE 6); page_like("http://yahoo.com", qr/.../, "check for expected text");...
12.29 KB  
Libraries  -  Test::Pod::Snippets 0.02
Test::Pod::Snippets is a Perl module to generate tests from pod code snippets. SYNOPSIS use Test::Pod::Snippets; my $tps = Test::Pod::Snippets->new(); $tps->generate_snippets( @pm_and_pod_files ); Fact 1 In a perfect world, a modules...
6.14 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.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...
3.88 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