Author: sebor
Date: Mon Aug 6 16:34:13 2007
New Revision: 563336
URL: http://svn.apache.org/viewvc?view=rev&rev=563336
Log:
2007-08-06 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-510
* locale.cpp (rw_opt_setlocales): Added option help.
Modified:
incubator/stdcxx/trunk/tests/src/locale.cpp
Modified: incubator/stdcxx/trunk/tests/src/locale.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/locale.cpp?view=diff&rev=563336&r1=563335&r2=563336
==============================================================================
--- incubator/stdcxx/trunk/tests/src/locale.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/locale.cpp Mon Aug 6 16:34:13 2007
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software.
*
**************************************************************************/
@@ -801,7 +801,16 @@
_TEST_EXPORT int
rw_opt_setlocales (int argc, char* argv[])
{
- RW_ASSERT (0 < argc && argv [0]);
+ if (1 == argc && argv && 0 == argv [0]) {
+ static const char helpstr[] = {
+ "Use the locales specified by the space-parated list of locale"
+ "names given by <arg>.\n"
+ };
+
+ argv [0] = _RWSTD_CONST_CAST (char*, helpstr);
+
+ return 0;
+ }
// the option requires an equals sign followed by an optional argument
char *args = strchr (argv [0], '=');