File: 07_class_version.t

package info (click to toggle)
libv-perl 0.22-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192 kB
  • sloc: perl: 556; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 503 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl -I.

use strict;
use warnings;

use t::Test::abeltje;

{   require_ok ("V");

    my $version;
    my $warning = warning {
	$version = V::get_version ("GH::ClassIssue1");
	};

    is ($version, "0.42", "Class also works");

    if ($] < 5.012) {
	like (
	    $warning,
	    qr{^Your perl .+ GH::ClassIssue1},
	    "Found warning for perl $]"
	    );
	}
    else {
	is_deeply ($warning, [], "No warnings for perl $]")
	    or diag (explain ($warning));
	}
    }

abeltje_done_testing ();