summaryrefslogtreecommitdiff
blob: 274605c44c7d67ef23c1dcce452247435a7cd2c1 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
From 497224cad8b6469913c61ee856228bc1d0280980 Mon Sep 17 00:00:00 2001
From: Pali <pali@cpan.org>
Date: Mon, 17 Apr 2017 21:38:58 +0200
Subject: [PATCH] Fix tests on Perl On 5.25.10 or greater with
 -Ddefault_inc_excludes_dot

Some tests do not include dot in %INC and fails with error:
Can't locate t/lib.pl in @INC

Fixes: https://rt.cpan.org/Public/Bug/Display.html?id=120709
---
 t/40server_prepare_crash.t             | 3 ++-
 t/55utf8_jp.t                          | 3 ++-
 t/cve-2017-3302.t                      | 3 ++-
 t/magic.t                              | 3 ++-
 t/rt110983-valid-mysqlfd.t             | 3 ++-
 t/rt118977-zerofill.t                  | 3 ++-
 t/rt25389-bin-case.t                   | 3 ++-
 t/rt50304-column_info_parentheses.t    | 3 ++-
 t/rt61849-bind-param-buffer-overflow.t | 3 ++-
 t/rt75353-innodb-lock-timeout.t        | 3 ++-
 t/rt83494-quotes-comments.t            | 3 ++-
 11 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/t/40server_prepare_crash.t b/t/40server_prepare_crash.t
index e3777b9..d04eb9c 100644
--- a/t/40server_prepare_crash.t
+++ b/t/40server_prepare_crash.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password, { PrintError => 1, RaiseError => 1, AutoCommit => 0, mysql_server_prepare => 1, mysql_server_prepare_disable_fallback => 1 });
 plan skip_all => "You must have MySQL version 4.1.3 and greater for this test to run" if $dbh->{mysql_clientversion} < 40103 or $dbh->{mysql_serverversion} < 40103;
diff --git a/t/55utf8_jp.t b/t/55utf8_jp.t
index 638d494..88874c3 100644
--- a/t/55utf8_jp.t
+++ b/t/55utf8_jp.t
@@ -6,7 +6,8 @@ use DBI;
 use Encode;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password, { mysql_enable_utf8 => 1, PrintError => 1, RaiseError => 1 });
 
diff --git a/t/cve-2017-3302.t b/t/cve-2017-3302.t
index b2de927..fbca0e3 100644
--- a/t/cve-2017-3302.t
+++ b/t/cve-2017-3302.t
@@ -6,7 +6,8 @@ if ($ENV{SKIP_CRASH_TESTING}) {
 no warnings 'once';
 use DBI;
 use vars qw($test_dsn $test_user $test_password $test_db);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 eval {
   $dbh = DBI->connect($test_dsn, $test_user, $test_password, {RaiseError => 1, mysql_server_prepare => 1});
 } or do {
diff --git a/t/magic.t b/t/magic.t
index 2720655..a7978a4 100644
--- a/t/magic.t
+++ b/t/magic.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $tb = Test::More->builder;
 binmode $tb->failure_output, ":utf8";
diff --git a/t/rt110983-valid-mysqlfd.t b/t/rt110983-valid-mysqlfd.t
index ad59762..12dace7 100644
--- a/t/rt110983-valid-mysqlfd.t
+++ b/t/rt110983-valid-mysqlfd.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password, { RaiseError => 1, AutoCommit => 0 });
 
diff --git a/t/rt118977-zerofill.t b/t/rt118977-zerofill.t
index 1992c4c..328766b 100644
--- a/t/rt118977-zerofill.t
+++ b/t/rt118977-zerofill.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password, { PrintError => 1, RaiseError => 1 });
 
diff --git a/t/rt25389-bin-case.t b/t/rt25389-bin-case.t
index cbda8b7..3aee41b 100644
--- a/t/rt25389-bin-case.t
+++ b/t/rt25389-bin-case.t
@@ -4,7 +4,8 @@ use warnings;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 use Test::More;
 
diff --git a/t/rt50304-column_info_parentheses.t b/t/rt50304-column_info_parentheses.t
index 76f9eff..6c3aac5 100644
--- a/t/rt50304-column_info_parentheses.t
+++ b/t/rt50304-column_info_parentheses.t
@@ -4,7 +4,8 @@ use warnings;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password $state);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 use Test::More;
 
diff --git a/t/rt61849-bind-param-buffer-overflow.t b/t/rt61849-bind-param-buffer-overflow.t
index 82baf2f..a3c75de 100644
--- a/t/rt61849-bind-param-buffer-overflow.t
+++ b/t/rt61849-bind-param-buffer-overflow.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $INSECURE_VALUE_FROM_USER = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
 
diff --git a/t/rt75353-innodb-lock-timeout.t b/t/rt75353-innodb-lock-timeout.t
index a1f437d..95694db 100644
--- a/t/rt75353-innodb-lock-timeout.t
+++ b/t/rt75353-innodb-lock-timeout.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh1 = DbiTestConnect($test_dsn, $test_user, $test_password, { RaiseError => 1, AutoCommit => 0 });
 
diff --git a/t/rt83494-quotes-comments.t b/t/rt83494-quotes-comments.t
index c48b0b9..83919f2 100644
--- a/t/rt83494-quotes-comments.t
+++ b/t/rt83494-quotes-comments.t
@@ -9,7 +9,8 @@ use DBI;
 use Test::More;
 
 use vars qw($test_dsn $test_user $test_password $state);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
                       { RaiseError => 1, PrintError => 0, AutoCommit => 0 });