[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r25772 - branches/svnpatch-diff/subversion/tests/libsvn_subr

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-07-17 22:24:58 CEST

Very nice! :)

On Tue, 17 Jul 2007, cacknin@tigris.org wrote:

> Author: cacknin
> Date: Tue Jul 17 09:13:26 2007
> New Revision: 25772
>
> Log:
> * subversion/tests/libsvn_subr/string-test.c
> (test24): add new test for svn_stringbuf_appendf().
...
> --- branches/svnpatch-diff/subversion/tests/libsvn_subr/string-test.c (original)
> +++ branches/svnpatch-diff/subversion/tests/libsvn_subr/string-test.c Tue Jul 17 09:13:26 2007
...
> +static svn_error_t *
> +test24(const char **msg,
> + svn_boolean_t msg_only,
> + svn_test_opts_t *opts,
> + apr_pool_t *pool)
> +{
> + int answer = 42;
> + const char life[] = "Life",
> + universe[] = "The Universe",
> + everything[] = "Everything";
> +
> + *msg = "append format-bytes, then compare two strings";
> +
> + if (msg_only)
> + return SVN_NO_ERROR;
> +
> + a = svn_stringbuf_create(phrase_1, pool);
> + svn_stringbuf_appendf(a, "should The Answer to %s, %s, and %s be %d?",
> + life, universe, everything, answer);
> +
> + /* Test that length, data, and null-termination are correct. */
> + if (svn_stringbuf_compare
> + (a, svn_stringbuf_createf(pool,
> + "hello, should The Answer to %s, %s, " \
> + "and %s be %d?",
> + life, universe, everything, answer)))
> + return SVN_NO_ERROR;
> + else
> + return fail(pool, "test failed");
> +}
...

  • application/pgp-signature attachment: stored
Received on Tue Jul 17 22:24:09 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.