Skip to content

Commit 17a0b83

Browse files
committed
Edited test names. Prepared to release
1 parent d1428d4 commit 17a0b83

File tree

6 files changed

+30
-27
lines changed

6 files changed

+30
-27
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Revision history for AnyEvent::RipeRedis.
22

3+
0.12 Mon Aug 29 16:48:05 MSK 2016
4+
- Refactoring of unit test.
5+
36
0.10 Wed Aug 26 11:44:35 MSK 2016
47
- Removed "on_connect_error" callback.
58
- POD Improved.

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AnyEvent-RipeRedis version 0.11_01
1+
AnyEvent-RipeRedis version 0.12
22
======================
33

44
INSTALLATION

lib/AnyEvent/RipeRedis.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use warnings;
66
use base qw( Exporter );
77

8-
our $VERSION = '0.11_01';
8+
our $VERSION = '0.12';
99

1010
use AnyEvent::RipeRedis::Error;
1111

@@ -201,7 +201,7 @@ sub on_error {
201201

202202
# Generate accessors
203203
{
204-
no strict 'refs';
204+
no strict qw( refs );
205205

206206
foreach my $name ( qw( host port database ) ) {
207207
*{$name} = sub {

lib/AnyEvent/RipeRedis/Error.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.008000;
44
use strict;
55
use warnings;
66

7-
our $VERSION = '0.11_01';
7+
our $VERSION = '0.12';
88

99

1010
sub new {

t/04-commands.t

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ t_mbulk_reply($redis);
5757
t_mbulk_reply_empty_list($redis);
5858
t_mbulk_reply_undef($redis);
5959
t_nested_mbulk_reply($redis);
60-
t_multi_word_command($redis);
60+
t_multiword_command($redis);
6161
t_oprn_error($redis);
6262
t_default_on_error($redis);
6363
t_error_after_exec($redis);
@@ -101,7 +101,7 @@ sub t_status_reply {
101101
}
102102
);
103103

104-
is( $t_reply, 'OK', 'SET; status reply' );
104+
is( $t_reply, 'OK', 'status reply; SET' );
105105

106106
return;
107107
}
@@ -141,7 +141,7 @@ sub t_numeric_reply {
141141
}
142142
);
143143

144-
is( $t_reply, 1, 'INCR; numeric reply' );
144+
is( $t_reply, 1, 'numeric reply; INCR' );
145145

146146
return;
147147
}
@@ -183,7 +183,7 @@ sub t_bulk_reply {
183183
}
184184
);
185185

186-
is( $t_reply, "some\r\nstring", 'GET; bulk reply' );
186+
is( $t_reply, "some\r\nstring", 'bulk reply; GET' );
187187

188188
return;
189189
}
@@ -212,7 +212,7 @@ sub t_set_undef {
212212
}
213213
);
214214

215-
is( $t_reply, 'OK', 'SET; undef' );
215+
is( $t_reply, 'OK', 'write undef; SET' );
216216

217217
return;
218218
}
@@ -241,7 +241,7 @@ sub t_get_undef {
241241
}
242242
);
243243

244-
is( $t_reply, '', 'GET; undef' );
244+
is( $t_reply, '', 'read undef; GET' );
245245

246246
return;
247247
}
@@ -281,7 +281,7 @@ sub t_set_utf8_string {
281281
}
282282
);
283283

284-
is( $t_reply, 'OK', 'SET; UTF-8 string' );
284+
is( $t_reply, 'OK', 'write UTF-8 string; SET' );
285285

286286
return;
287287
}
@@ -323,7 +323,7 @@ sub t_get_utf8_string {
323323
}
324324
);
325325

326-
is( $t_reply, 'Значение', 'GET; UTF-8 string' );
326+
is( $t_reply, 'Значение', 'read UTF-8 string; GET' );
327327

328328
return;
329329
}
@@ -353,7 +353,7 @@ sub t_get_non_existent {
353353
}
354354
);
355355

356-
ok( !defined $t_reply && !defined $t_err, 'GET; non existent key' );
356+
ok( !defined $t_reply && !defined $t_err, 'read non existent key; GET' );
357357

358358
return;
359359
}
@@ -404,7 +404,7 @@ sub t_mbulk_reply {
404404
element_3
405405
)
406406
],
407-
'LRANGE; multi-bulk reply'
407+
'multi-bulk reply; LRANGE'
408408
);
409409

410410
return;
@@ -434,7 +434,7 @@ sub t_mbulk_reply_empty_list {
434434
}
435435
);
436436

437-
is_deeply( $t_reply, [], 'LRANGE; empty list' );
437+
is_deeply( $t_reply, [], 'read empty list; LRANGE' );
438438

439439
return;
440440
}
@@ -464,7 +464,7 @@ sub t_mbulk_reply_undef {
464464
}
465465
);
466466

467-
ok( !defined $t_reply && !defined $t_err, 'BRPOP; multi-bulk undef' );
467+
ok( !defined $t_reply && !defined $t_err, 'read multi-bulk undef; BLPOP' );
468468

469469
return;
470470
}
@@ -533,13 +533,13 @@ sub t_nested_mbulk_reply {
533533
)
534534
],
535535
],
536-
'EXEC; nested multi-bulk reply'
536+
'nested multi-bulk reply; MULTI/EXEC'
537537
);
538538

539539
return;
540540
}
541541

542-
sub t_multi_word_command {
542+
sub t_multiword_command {
543543
my $redis = shift;
544544

545545
my $ver = get_redis_version($redis);
@@ -570,7 +570,7 @@ sub t_multi_word_command {
570570
}
571571
);
572572

573-
is_deeply( $t_reply, 'OK', 'CLIENT SETNAME; multiple word command' );
573+
is_deeply( $t_reply, 'OK', 'multiword command; CLIENT SETNAME' );
574574

575575
ev_loop(
576576
sub {
@@ -591,7 +591,7 @@ sub t_multi_word_command {
591591
}
592592
);
593593

594-
is_deeply( $t_reply, 'test', 'CLIENT GETNAME; multiple word command' );
594+
is_deeply( $t_reply, 'test', 'multiword command; CLIENT GETNAME' );
595595
}
596596

597597
return;
@@ -618,7 +618,7 @@ sub t_oprn_error {
618618
}
619619
);
620620

621-
my $t_npref = 'operation error;';
621+
my $t_npref = 'operation error';
622622
isa_ok( $t_err, 'AnyEvent::RipeRedis::Error' );
623623
ok( defined $t_err->message, "$t_npref; error message" );
624624
is( $t_err->code, E_OPRN_ERROR, "$t_npref; error code" );
@@ -677,7 +677,7 @@ sub t_error_after_exec {
677677
}
678678
);
679679

680-
my $t_npref = 'error after EXEC;';
680+
my $t_npref = 'error after EXEC';
681681
isa_ok( $t_err, 'AnyEvent::RipeRedis::Error' );
682682
is( $t_err->message, q{Operation "exec" completed with errors.},
683683
"$t_npref; error message" );
@@ -733,7 +733,7 @@ sub t_discard {
733733
}
734734
);
735735

736-
is( $t_reply, 'OK', 'DISCARD; status reply' );
736+
is( $t_reply, 'OK', 'DISCARD' );
737737

738738
return;
739739
}
@@ -775,7 +775,7 @@ sub t_execute {
775775
}
776776
);
777777

778-
is( $t_reply, 'OK', 'execute; status reply' );
778+
is( $t_reply, 'OK', 'execute' );
779779

780780
return;
781781
}
@@ -804,7 +804,7 @@ sub t_quit {
804804
}
805805
);
806806

807-
is( $t_reply, 'OK', 'QUIT; status reply; disconnect' );
807+
is( $t_reply, 'OK', 'disconnect; QUIT' );
808808
ok( $T_DISCONNECTED, 'on_disconnect' );
809809

810810
return;

t/08-eval.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ sub t_error_reply {
191191
}
192192
);
193193

194-
my $t_npref = 'eval_cached; error reply;';
194+
my $t_npref = 'eval_cached; error reply';
195195
isa_ok( $t_err, 'AnyEvent::RipeRedis::Error' );
196196
is( $t_err->message, 'ERR Something wrong.', "$t_npref; error message" );
197197
is( $t_err->code, E_OPRN_ERROR, "$t_npref; error code" );
@@ -225,7 +225,7 @@ sub t_errors_in_mbulk_reply {
225225
}
226226
);
227227

228-
my $t_npref = 'errors in multi-bulk reply;';
228+
my $t_npref = 'errors in multi-bulk reply';
229229
isa_ok( $t_err, 'AnyEvent::RipeRedis::Error' );
230230
is( $t_err->message, q{Operation "eval_cached" completed with errors.},
231231
"$t_npref; error message" );

0 commit comments

Comments
 (0)