Skip to content

Commit 6fbf5cb

Browse files
committed
perltidy
1 parent 95cb405 commit 6fbf5cb

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

t/11-sql.t

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,24 +233,24 @@ is($stmt->as_sql_where, "WHERE ((foo = ?) AND (foo = ?) AND (foo = ?)) AND ((foo
233233

234234
## as_escape
235235
$stmt = ns();
236-
$stmt->add_where(foo => {op => 'LIKE', value => '100%', escape => '\\'});
236+
$stmt->add_where(foo => { op => 'LIKE', value => '100%', escape => '\\' });
237237
is($stmt->as_sql_where, "WHERE (foo LIKE ? ESCAPE '\\')\n");
238-
is($stmt->bind->[0], '100%'); # escape doesn't automatically escape the value
238+
is($stmt->bind->[0], '100%'); # escape doesn't automatically escape the value
239239
$stmt = ns();
240-
$stmt->add_where(foo => {op => 'LIKE', value => '100\\%', escape => '\\'});
240+
$stmt->add_where(foo => { op => 'LIKE', value => '100\\%', escape => '\\' });
241241
is($stmt->as_sql_where, "WHERE (foo LIKE ? ESCAPE '\\')\n");
242-
is($stmt->bind->[0], '100\\%');
242+
is($stmt->bind->[0], '100\\%');
243243
$stmt = ns();
244-
$stmt->add_where(foo => {op => 'LIKE', value => '100%', escape => '!'});
244+
$stmt->add_where(foo => { op => 'LIKE', value => '100%', escape => '!' });
245245
is($stmt->as_sql_where, "WHERE (foo LIKE ? ESCAPE '!')\n");
246246
$stmt = ns();
247-
$stmt->add_where(foo => {op => 'LIKE', value => '100%', escape => "''"});
247+
$stmt->add_where(foo => { op => 'LIKE', value => '100%', escape => "''" });
248248
is($stmt->as_sql_where, "WHERE (foo LIKE ? ESCAPE '''')\n");
249249
$stmt = ns();
250-
$stmt->add_where(foo => {op => 'LIKE', value => '100%', escape => "\\'"});
250+
$stmt->add_where(foo => { op => 'LIKE', value => '100%', escape => "\\'" });
251251
is($stmt->as_sql_where, "WHERE (foo LIKE ? ESCAPE '\\'')\n");
252252
$stmt = ns();
253-
eval { $stmt->add_where(foo => {op => 'LIKE', value => '_', escape => "!!!"}); };
253+
eval { $stmt->add_where(foo => { op => 'LIKE', value => '_', escape => "!!!" }); };
254254
like($@, qr/length/, 'right error');
255255

256256
$stmt = ns();

t/61-escape.t

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,52 +34,52 @@ $exclamation->save;
3434

3535
subtest 'escape_char 1' => sub {
3636
my @got = Foo->search({ text => { op => 'LIKE', value => '100!%', escape => '!' } });
37-
is scalar(@got), 1, 'right number';
37+
is scalar(@got), 1, 'right number';
3838
is $got[0]->name, 'percent', 'right name';
3939
};
4040

4141
subtest 'escape_char 2' => sub {
4242
my @got = Foo->search({ text => { op => 'LIKE', value => '100#_', escape => '#' } });
43-
is scalar(@got), 1, 'right number';
43+
is scalar(@got), 1, 'right number';
4444
is $got[0]->name, 'underscore', 'right name';
4545
};
4646

4747
subtest 'self escape' => sub {
4848
my @got = Foo->search({ text => { op => 'LIKE', value => '100!!', escape => '!' } });
49-
is scalar(@got), 1, 'right number';
49+
is scalar(@got), 1, 'right number';
5050
is $got[0]->name, 'exclamation', 'right name';
5151
};
5252

5353
subtest 'use wildcard charactor as escapr_char' => sub {
5454
plan skip_all => 'MariaDB does not support it' if Foo->driver->dbh->{Driver}->{Name} eq 'MariaDB';
5555
my @got = Foo->search({ text => { op => 'LIKE', value => '100_%', escape => '_' } });
56-
is scalar(@got), 1, 'right number';
56+
is scalar(@got), 1, 'right number';
5757
is $got[0]->name, 'percent', 'right name';
5858
};
5959

6060
subtest 'use of special characters' => sub {
6161
subtest 'escape_char single quote' => sub {
6262
my @got = Foo->search({ text => { op => 'LIKE', value => "100'_", escape => "''" } });
63-
is scalar(@got), 1, 'right number';
63+
is scalar(@got), 1, 'right number';
6464
is $got[0]->name, 'underscore', 'right name';
6565
};
6666

6767
if (Foo->driver->dbh->{Driver}->{Name} =~ /mysql|mariadb/i) {
6868
subtest 'escape_char single quote' => sub {
6969
my @got = Foo->search({ text => { op => 'LIKE', value => "100'_", escape => "\\'" } });
70-
is scalar(@got), 1, 'right number';
70+
is scalar(@got), 1, 'right number';
7171
is $got[0]->name, 'underscore', 'right name';
7272
};
7373

7474
subtest 'escape_char backslash' => sub {
7575
my @got = Foo->search({ text => { op => 'LIKE', value => '100\\_', escape => '\\\\' } });
76-
is scalar(@got), 1, 'right number';
76+
is scalar(@got), 1, 'right number';
7777
is $got[0]->name, 'underscore', 'right name';
7878
};
7979
} else {
8080
subtest 'escape_char backslash' => sub {
8181
my @got = Foo->search({ text => { op => 'LIKE', value => '100\\_', escape => '\\' } });
82-
is scalar(@got), 1, 'right number';
82+
is scalar(@got), 1, 'right number';
8383
is $got[0]->name, 'underscore', 'right name';
8484
};
8585
}

0 commit comments

Comments
 (0)