File: TestAssertionCodeRef.pm

package info (click to toggle)
libtest-unit-perl 0.25-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,348 kB
  • ctags: 543
  • sloc: perl: 4,290; makefile: 5
file content (15 lines) | stat: -rw-r--r-- 365 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package TestAssertionCodeRef;
use strict;

use base qw(Test::Unit::TestCase);

sub test_case_to_string { my $self = shift; $self->assert(sub { my
$self = shift; $self->to_string eq shift; }, $self,
"test_noy_to_string(" . ref($self) . ")"); }

sub test_with_a_regex {
    my $self = shift;
    $self->assert(qr/foo/, 'foo');
    $self->assert(qr/bar/, 'foo');
}
1;