2
2
* checksum-test.c: tests checksum functions.
4
4
* ====================================================================
5
* Copyright (c) 2008 CollabNet. All rights reserved.
7
* This software is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at http://subversion.tigris.org/license-1.html.
10
* If newer versions of this license are posted there, you may use a
11
* newer version instead, at your option.
13
* This software consists of voluntary contributions made by many
14
* individuals. For exact contribution history, see the revision
15
* history and logs, available at http://subversion.tigris.org/.
5
* Licensed to the Apache Software Foundation (ASF) under one
6
* or more contributor license agreements. See the NOTICE file
7
* distributed with this work for additional information
8
* regarding copyright ownership. The ASF licenses this file
9
* to you under the Apache License, Version 2.0 (the
10
* "License"); you may not use this file except in compliance
11
* with the License. You may obtain a copy of the License at
13
* http://www.apache.org/licenses/LICENSE-2.0
15
* Unless required by applicable law or agreed to in writing,
16
* software distributed under the License is distributed on an
17
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18
* KIND, either express or implied. See the License for the
19
* specific language governing permissions and limitations
16
21
* ====================================================================
19
24
#include <apr_pools.h>
21
26
#include "svn_error.h"
22
#include "svn_version.h"
24
28
#include "../svn_test.h"
26
30
static svn_error_t *
27
test_checksum_parse(const char **msg,
28
svn_boolean_t msg_only,
29
svn_test_opts_t *opts,
31
test_checksum_parse(apr_pool_t *pool)
32
33
const char *md5_digest = "8518b76f7a45fe4de2d0955085b41f98";
33
34
const char *sha1_digest = "74d82379bcc6771454377db03b912c2b62704139";
34
35
const char *checksum_display;
35
36
svn_checksum_t *checksum;
37
*msg = "checksum parse";
41
38
SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_md5, md5_digest, pool));
42
39
checksum_display = svn_checksum_to_cstring_display(checksum, pool);