Skip to content

Instantly share code, notes, and snippets.

@Grinnz
Created August 26, 2020 16:29
Show Gist options
  • Save Grinnz/d5098c7ec50829b68cf314f571da6435 to your computer and use it in GitHub Desktop.
Save Grinnz/d5098c7ec50829b68cf314f571da6435 to your computer and use it in GitHub Desktop.
Protocol::Redis::XS nil tests
use strict;
use warnings;
use Test::More;
use Protocol::Redis::XS;
my $redis = new_ok 'Protocol::Redis::XS', [api => 1];
$redis->parse("\$-1\r\n");
is $redis->get_message->{data}, undef, "nil bulk message";
$redis->parse("*-1\r\n");
is $redis->get_message->{data}, undef, "nil multi-bulk message";
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment