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

2011-02-13 Thread Danny Trebbien
>> I also try the Windows-specific locale strings first because I know >> that a Linux system successfully ignores them. > > Does setlocale even have a real effect on Windows? Last time I looked, > you couldn't change the per-process locale. Yes. I have developed some websites in PHP on Windows w

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

2011-02-13 Thread Branko Čibej
On 13.02.2011 20:15, Danny Trebbien wrote: > I also try the Windows-specific locale strings first because I know > that a Linux system successfully ignores them. Does setlocale even have a real effect on Windows? Last time I looked, you couldn't change the per-process locale. -- Brane

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

2011-02-13 Thread Stefan Sperling
On Sun, Feb 13, 2011 at 11:15:13AM -0800, Danny Trebbien wrote: > Per Philip's suggestion, I have switched the test to trying a list of > locales. While I have not tested it on Windows, I am using examples > from MSDN verbatim. It should work. > > I also try the Windows-specific locale strings f

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

2011-02-13 Thread Danny Trebbien
>> >> Yes, I basically just want a non-UTF-8 locale.  Which one do you suggest? > > Danny, what is this new test for (sorry if this has been explained in > some other thread -- I briefly checked and couldn't find any). Hi Stefan, This is for a new test. See: http://thread.gmane.org/gmane.comp.ve

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

2011-02-13 Thread Stefan Sperling
On Sun, Feb 13, 2011 at 12:09:32AM +, Philip Martin wrote: > Philip Martin writes: > > > Danny Trebbien writes: > > > >>> 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

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

2011-02-13 Thread Philip Martin
Danny Trebbien writes: >> While I couldn't get SVN_TEST_SKIP2 to work because the availability >> of a locale cannot be tested at preprocessing time > > Actually, at compile time. Ah, yes. Perhaps you could extend svn_test_mode_t and add a new svn_test_skip_runtime mode: add support in svn_test

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

2011-02-12 Thread Danny Trebbien
> While I couldn't get SVN_TEST_SKIP2 to work because the availability > of a locale cannot be tested at preprocessing time Actually, at compile time.

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

2011-02-12 Thread Danny Trebbien
> How about trying a list?  en_US.8859-1 is widely available even if not > actually installed.  I don't know which non-utf8 locales are widely > installed, personally I have en_GB.8859-1.  We have several German devs > so maybe de_DE.8859-1?  Perhaps jp_JP.EUC-JP? While I couldn't get SVN_TEST_SKI

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

2011-02-12 Thread Philip Martin
Philip Martin writes: > Danny Trebbien writes: > >>> 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? >> >> Yes, I basically just want a non-UTF-8 locale. Which

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

2011-02-12 Thread Philip Martin
Danny Trebbien writes: >> 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? > > Yes, I basically just want a non-UTF-8 locale. Which one do you suggest? How about

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

2011-02-12 Thread Danny Trebbien
> 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? Yes, I basically just want a non-UTF-8 locale. Which one do you suggest? > You could write a function to determine

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

2011-02-12 Thread Philip Martin
Danny Trebbien 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?

Best way to issue a warning in a C test

2011-02-12 Thread Danny Trebbien
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