source: trunk/libtransmission/clients-test.c

Last change on this file was 14286, checked in by jordan, 6 years ago

(trunk, libT) #5711: add support for BitTorrent? client peer-id

  • Property svn:keywords set to Date Rev Author Id
File size: 1.3 KB
Line 
1/*
2 * This file Copyright (C) 2013-2014 Mnemosyne LLC
3 *
4 * It may be used under the GNU GPL versions 2 or 3
5 * or any future license endorsed by Mnemosyne LLC.
6 *
7 * $Id: clients-test.c 14286 2014-06-07 15:07:51Z mikedld $
8 */
9
10#include "transmission.h"
11#include "clients.h"
12
13#include "libtransmission-test.h"
14
15#define TEST_CLIENT(A, B) \
16    tr_clientForId (buf, sizeof (buf), A); \
17    check_streq (B, buf);
18
19int
20main (void)
21{
22    char buf[128];
23
24    TEST_CLIENT ("-FC1013-", "FileCroc 1.0.1.3");
25    TEST_CLIENT ("-MR1100-", "Miro 1.1.0.0");
26    TEST_CLIENT ("-TR0006-", "Transmission 0.6");
27    TEST_CLIENT ("-TR0072-", "Transmission 0.72");
28    TEST_CLIENT ("-TR111Z-", "Transmission 1.11+");
29    TEST_CLIENT ("O1008132", "Osprey 1.0.0");
30    TEST_CLIENT ("TIX0193-", "Tixati 1.93");
31    TEST_CLIENT ("-UT341\0-", "\xc2\xb5Torrent 3.4.1");
32    TEST_CLIENT ("-BT791\0-", "BitTorrent 7.9.1");
33    TEST_CLIENT ("-BT791B-", "BitTorrent 7.9.1 (Beta)");
34
35    /* gobbledygook */
36    TEST_CLIENT ("-IIO\x10\x2D\x04-", "-IIO%10-%04-");
37    TEST_CLIENT ("-I\05O\x08\x03\x01-", "-I%05O%08%03%01-");
38
39    TEST_CLIENT (
40        "\x65\x78\x62\x63\x00\x38\x7A\x44\x63\x10\x2D\x6E\x9A\xD6\x72\x3B\x33\x9F\x35\xA9",
41        "BitComet 0.56");
42    TEST_CLIENT (
43        "\x65\x78\x62\x63\x00\x38\x4C\x4F\x52\x44\x32\x00\x04\x8E\xCE\xD5\x7B\xD7\x10\x28",
44        "BitLord 0.56");
45
46    /* cleanup */
47    return 0;
48}
49
Note: See TracBrowser for help on using the repository browser.