From: Martin Mares Date: Sun, 15 Feb 2004 17:31:42 +0000 (+0000) Subject: Added testing routines for URL key calculator. X-Git-Tag: holmes-import~1120 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1c8494381f908f01b415d6be07985f74d6700d48;p=libucw.git Added testing routines for URL key calculator. --- diff --git a/lib/urlkey.c b/lib/urlkey.c index 145ef484..4275b05f 100644 --- a/lib/urlkey.c +++ b/lib/urlkey.c @@ -268,5 +268,25 @@ void url_fingerprint(byte *url, struct fingerprint *fp) { byte buf[URL_KEY_BUF_SIZE]; - return fingerprint(url_key(url, buf), fp); + fingerprint(url_key(url, buf), fp); } + +#ifdef TEST + +int main(int argc, char **argv) +{ + url_key_init(); + for (int i=1; i