summaryrefslogtreecommitdiff
path: root/ACE/tests/Bug_3319_Regression_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/Bug_3319_Regression_Test.cpp')
-rw-r--r--ACE/tests/Bug_3319_Regression_Test.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/ACE/tests/Bug_3319_Regression_Test.cpp b/ACE/tests/Bug_3319_Regression_Test.cpp
new file mode 100644
index 00000000000..ea6de0c6322
--- /dev/null
+++ b/ACE/tests/Bug_3319_Regression_Test.cpp
@@ -0,0 +1,39 @@
+/**
+ * @file Bug_3319_Regression_Test.cpp
+ *
+ * $Id$
+ *
+ * Reproduces the problems reported in bug 2975:
+ * http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=3319
+ */
+
+#include "ace/ACE.h"
+#include "test_config.h"
+#include "ace/Service_Config.h"
+#include "ace/ARGV.h"
+#include "ace/Log_Msg.h"
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT ("Bug_3319_Regression_Test"));
+
+ ACE_Log_Msg *log_msg = ACE_LOG_MSG;
+ ACE_ARGV args;
+ args.add (ACE_TEXT("MyProgram"), true);
+ int ret = ACE_Service_Config::open(args.argc(), args.argv(),
+ ACE_DEFAULT_LOGGER_KEY,
+ 1, 1, 1);
+
+ if (ACE_OS::strcmp (log_msg->program_name (), ACE_TEXT("MyProgram")) != 0)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Program name is not <MyProgram> but <%s>\n"),
+ ACE_Log_Msg::program_name ()),
+ 1);
+ }
+
+ ACE_END_TEST;
+
+ return ret;
+}