extend identify_client test

This commit is contained in:
Arvid Norberg 2014-05-03 22:16:56 +00:00
parent e5a9a6b36f
commit 63942545a8
1 changed files with 7 additions and 4 deletions

View File

@ -231,10 +231,13 @@ int test_main()
// test identify_client
TEST_CHECK(identify_client(peer_id("-AZ1234-............")) == "Azureus 1.2.3.4");
TEST_CHECK(identify_client(peer_id("-AZ1230-............")) == "Azureus 1.2.3");
TEST_CHECK(identify_client(peer_id("S123--..............")) == "Shadow 1.2.3");
TEST_CHECK(identify_client(peer_id("M1-2-3--............")) == "Mainline 1.2.3");
TEST_EQUAL(identify_client(peer_id("-AZ123B-............")), "Azureus 1.2.3.11");
TEST_EQUAL(identify_client(peer_id("-AZ1230-............")), "Azureus 1.2.3");
TEST_EQUAL(identify_client(peer_id("S123--..............")), "Shadow 1.2.3");
TEST_EQUAL(identify_client(peer_id("S\x1\x2\x3....\0...........")), "Shadow 1.2.3");
TEST_EQUAL(identify_client(peer_id("M1-2-3--............")), "Mainline 1.2.3");
TEST_EQUAL(identify_client(peer_id("\0\0\0\0\0\0\0\0\0\0\0\0........")), "Generic");
TEST_EQUAL(identify_client(peer_id("-xx1230-............")), "xx 1.2.3");
// test network functions