exercism-perl5

Repository for my Perl 5 Exercism exercises
git clone git://git.samirparikh.com/exercism-perl5
Log | Files | Refs | README

hello-world.t (542B) - raw


      1 #!/usr/bin/env perl
      2 use Test2::V0;
      3 
      4 use FindBin qw<$Bin>;
      5 use lib $Bin, "$Bin/local/lib/perl5";    # Find modules in the same dir as this file.
      6 
      7 use HelloWorld qw<hello>;
      8 plan 2;                                  # This is how many tests we expect to run.
      9 
     10 imported_ok qw<hello> or bail_out;
     11 
     12 # Run the 'is' sub from 'Test2::V0' with three arguments.
     13 is(
     14   hello(),            # Run the 'hello' sub imported from the module.
     15   'Hello, World!',    # The expected result to compare with 'hello'.
     16   'Say Hi!'           # The test description.
     17 );