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

Re: Best way to issue a warning in a C test

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Sat, 12 Feb 2011 23:41:40 +0000

Danny Trebbien <dtrebbien_at_gmail.com> writes:

> I want to add a test to
> `subversion/tests/libsvn_subr/subst_translate-test.c` that will set
> the locale with setlocale(LC_ALL, "eo.ISO-8859-3"), issuing a warning
> if it is unable to because the eo.ISO-8859-3 locale is not installed.
>
> What is a good way to do this? I don't think that the test should fail
> simply because the system does not have the eo.ISO-8859-3 locale, but
> I would like a warning to be conspicuously printed in the test
> results.

I had to look that up, it's Esperanto. Why do you want that one? What
are you testing? It doesn't appear to be available on my machine. Do
you just want a non-utf8 locale?

You could write a function to determine if the locale is available and
then use that in SVN_TEST_SKIP2 to skip the test if the locale is not
available. The the test should be appear in the summary as SKIP.

-- 
Philip
Received on 2011-02-13 00:42:35 CET

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.