enable string tests on appveyor (#1064)

This commit is contained in:
Arvid Norberg 2016-09-05 15:17:12 -04:00 committed by GitHub
parent 0d64bda8d3
commit 994a84cfe8
2 changed files with 10 additions and 2 deletions

View File

@ -272,8 +272,15 @@ namespace libtorrent
while (start < in.size() && is_digit(in[start]) && in[start] != ',')
port += in[start++];
if (port.empty()) iface.port = -1;
else iface.port = std::atoi(port.c_str());
if (port.empty() || port.size() > 5)
{
iface.port = -1;
}
else
{
iface.port = std::atoi(port.c_str());
if (iface.port <= 0 || iface.port > 65535) iface.port = -1;
}
// skip spaces
while (start < in.size() && is_space(in[start]))

View File

@ -206,6 +206,7 @@ test-suite libtorrent :
# transitioned into simulations
alias win-tests :
test_primitives
test_string
test_dht
test_sha1_hash
test_bitfield