File: 08_corelist.t

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (22 lines) | stat: -rw-r--r-- 704 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
#! /usr/local/perl -w
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

#########################

use Test::More tests => 3;
use_ok("version", 0.9933);

# do strict lax tests in a sub to isolate a package to test importing
SKIP: {
    eval "use Module::CoreList 2.76";
    skip 'No tied hash in Modules::CoreList in Perl', 2
	if $@;

    my $foo = "version"->parse($Module::CoreList::version{5.008_000}{base});

    is $foo, 1.03, 'Correctly handle tied hash';

    $foo = "version"->qv($Module::CoreList::version{5.008_000}{Unicode});
    is $foo, '3.2.0', 'Correctly handle tied hash with dotted decimal';
}