Commit | Line | Data |
8ebc5c01 |
1 | #!./perl |
2 | |
3 | BEGIN { |
4 | chdir 't' if -d 't'; |
5 | @INC = '../lib'; |
6 | } |
7 | |
8 | print "1..14\n"; |
9 | |
10 | my $i = 1; |
11 | |
12 | eval "use 5.000;"; |
13 | if ($@) { |
14 | print STDERR $@,"\n"; |
15 | print "not "; |
16 | } |
17 | print "ok ",$i++,"\n"; |
18 | |
19 | eval sprintf "use %.5f;", $]; |
20 | if ($@) { |
21 | print STDERR $@,"\n"; |
22 | print "not "; |
23 | } |
24 | print "ok ",$i++,"\n"; |
25 | |
26 | |
27 | eval sprintf "use %.5f;", $] - 0.000001; |
28 | if ($@) { |
29 | print STDERR $@,"\n"; |
30 | print "not "; |
31 | } |
32 | print "ok ",$i++,"\n"; |
33 | |
34 | eval sprintf("use %.5f;", $] + 1); |
35 | unless ($@) { |
36 | print "not "; |
37 | } |
38 | print "ok ",$i++,"\n"; |
39 | |
40 | eval sprintf "use %.5f;", $] + 0.00001; |
41 | unless ($@) { |
42 | print "not "; |
43 | } |
44 | print "ok ",$i++,"\n"; |
45 | |
46 | |
47 | |
48 | use lib; # I know that this module will be there. |
49 | |
50 | |
51 | local $lib::VERSION = 1.0; |
52 | |
53 | eval "use lib 0.9"; |
54 | if ($@) { |
55 | print STDERR $@,"\n"; |
56 | print "not "; |
57 | } |
58 | print "ok ",$i++,"\n"; |
59 | |
60 | eval "use lib 1.0"; |
61 | if ($@) { |
62 | print STDERR $@,"\n"; |
63 | print "not "; |
64 | } |
65 | print "ok ",$i++,"\n"; |
66 | |
67 | eval "use lib 1.01"; |
68 | unless ($@) { |
69 | print "not "; |
70 | } |
71 | print "ok ",$i++,"\n"; |
72 | |
73 | |
74 | eval "use lib 0.9 qw(fred)"; |
75 | if ($@) { |
76 | print STDERR $@,"\n"; |
77 | print "not "; |
78 | } |
79 | print "ok ",$i++,"\n"; |
80 | |
81 | print "not " unless $INC[0] eq "fred"; |
82 | print "ok ",$i++,"\n"; |
83 | |
84 | eval "use lib 1.0 qw(joe)"; |
85 | if ($@) { |
86 | print STDERR $@,"\n"; |
87 | print "not "; |
88 | } |
89 | print "ok ",$i++,"\n"; |
90 | |
91 | print "not " unless $INC[0] eq "joe"; |
92 | print "ok ",$i++,"\n"; |
93 | |
94 | eval "use lib 1.01 qw(freda)"; |
95 | unless ($@) { |
96 | print "not "; |
97 | } |
98 | print "ok ",$i++,"\n"; |
99 | |
100 | print "not " if $INC[0] eq "freda"; |
101 | print "ok ",$i++,"\n"; |