TEST: added the same bop mget test as the java client unit test.
#!/usr/bin/perl
use strict;
-use Test::More tests => 67;
+use Test::More tests => 69;
use FindBin qw($Bin);
use lib "$Bin/lib";
use MemcachedTest;
@@ -501,5 +501,30 @@ mem_cmd_is($sock, $cmd, $val, $rst);
$val = "$key1?$key2?$key1";
mem_cmd_is($sock, $cmd, $val, "CLIENT_ERROR bad data chunk");
+# case) the same test as the java client unit test
+my $kcnt = 200;
+my $kstr = "a"x30000;
+my $kidx;
+my $klen;
+$rst = "";
+for ($kidx = 0; $kidx < $kcnt; $kidx += 1) {
+ $rst .= "VALUE $kstr$kidx NOT_FOUND\n";
+}
+$rst .= "END";
+$val = "$kstr" . "0";
+for ($kidx = 1; $kidx < $kcnt; $kidx += 1) {
+ $val .= " $kstr$kidx";
+}
+$klen = length($val);
+$cmd = "bop mget $klen $kcnt 0..1000 10";
+mem_cmd_is($sock, $cmd, $val, $rst);
+$val = "$kstr" . "0";
+for ($kidx = 1; $kidx < $kcnt; $kidx += 1) {
+ $val .= ",$kstr$kidx";
+}
+$klen = length($val);
+$cmd = "bop mget $klen $kcnt 0..1000 10";
+mem_cmd_is($sock, $cmd, $val, $rst);
+
# after test
release_memcached($engine, $server);
