diff options
author | Dustin Sallings <dustin@spy.net> | 2009-05-14 15:30:39 -0700 |
---|---|---|
committer | Trond Norbye <Trond.Norbye@sun.com> | 2009-05-15 16:00:58 +0200 |
commit | c666e344fadbb1460ee0f4a148263b429999a714 (patch) | |
tree | abed10556d23f480e0f7fb3b13b79ba01318815b /t/00-startup.t | |
parent | 0a1e88dafc02db59d64366b85441d73a7ddb87a9 (diff) | |
download | memcached-c666e344fadbb1460ee0f4a148263b429999a714.tar.gz |
Don't abort when creating a socket with an unknown binding protocol.1.4.0-rc1
This changes the abort to an assert and tests for such failures.
Diffstat (limited to 't/00-startup.t')
-rwxr-xr-x | t/00-startup.t | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/t/00-startup.t b/t/00-startup.t index 0d30ac0..1e1d1bf 100755 --- a/t/00-startup.t +++ b/t/00-startup.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use Test::More tests => 14; +use Test::More tests => 17; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; @@ -51,6 +51,24 @@ eval { }; is($@, '', "binary works"); +eval { + my $server = new_memcached("-vv -B auto"); +}; +is($@, '', "auto works"); + +eval { + my $server = new_memcached("-vv -B ascii"); +}; +is($@, '', "ascii works"); + + +# For the binary test, we just verify it starts since we don't have an easy bin client. +eval { + my $server = new_memcached("-vv -B binary"); +}; +is($@, '', "binary works"); + + # Should blow up with something invalid. eval { my $server = new_memcached("-B http"); |