PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/perl5/char_strings_runme.pl

#
Perl | 15 lines | 11 code | 3 blank | 1 comment | 0 complexity | 412a10772835c33455cdbe82d4fadd4c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. use strict;
  2. use warnings;
  3. use Test::More tests => 5;
  4. BEGIN { use_ok('char_strings') }
  5. require_ok('char_strings');
  6. my $val1 = "100";
  7. is(char_strings::CharPingPong($val1), "100", 'cstr1');
  8. my $val2 = "greetings";
  9. is(char_strings::CharPingPong($val2), "greetings", 'cstr2');
  10. # SF#2564192
  11. "this is a test" =~ /(\w+)$/;
  12. is(char_strings::CharPingPong($1), "test", "handles Magical");