Index: trunk/psLib/test/sysUtils/tst_psTrace.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psTrace.c	(revision 1732)
+++ trunk/psLib/test/sysUtils/tst_psTrace.c	(revision 1736)
@@ -16,5 +16,7 @@
 static int testTrace04(void);
 static int testTrace05(void);
+static int testTrace05a(void);
 static int testTrace06(void);
+static int testTrace20(void);
 
 testDescription tests[] = {
@@ -25,5 +27,7 @@
                               {testTrace04, 4, "psTrace()", 0, false},
                               {testTrace05, 5, "psTracePrintLevels()", 0, false},
+                              {testTrace05a, 5, "optional leading dot and psTracePrintLevels()", 0, false},
                               {testTrace06, 6, "Testing psTraceReset", 0, false},
+                              {testTrace20, 20, "Testing ", 0, false},
                               {NULL}
                           };
@@ -215,4 +219,28 @@
     (void)psTraceSetLevel(".c.b", 3);
     (void)psTraceSetLevel(".c.c", 5);
+
+    psTracePrintLevels();
+
+    return 0;
+
+}
+
+static int testTrace05a(void)
+{
+    (void)psTraceSetLevel(".", 9);
+
+    (void)psTraceSetLevel("a", 8);
+    (void)psTraceSetLevel("b", 7);
+    (void)psTraceSetLevel("c", 5);
+
+    (void)psTraceSetLevel("a.a", 4);
+    (void)psTraceSetLevel("a.b", 3);
+
+    (void)psTraceSetLevel("b.a", 2);
+    (void)psTraceSetLevel("b.b", 1);
+
+    (void)psTraceSetLevel("c.a", 0);
+    (void)psTraceSetLevel("c.b", 3);
+    (void)psTraceSetLevel("c.c", 5);
 
     psTracePrintLevels();
@@ -261,2 +289,37 @@
 }
 
+static int testTrace20(void)
+{
+    (void)psTraceSetLevel(".", 9);
+
+    (void)psTraceSetLevel(".a", 8);
+    (void)psTraceSetLevel(".b", 7);
+    (void)psTraceSetLevel(".c", 5);
+
+    (void)psTraceSetLevel(".a.a", 4);
+    (void)psTraceSetLevel(".a.b", 3);
+
+    (void)psTraceSetLevel(".b.a", 2);
+    (void)psTraceSetLevel(".b.b", 1);
+
+    (void)psTraceSetLevel(".c.a", 0);
+    (void)psTraceSetLevel(".c.b", 3);
+    (void)psTraceSetLevel(".c.c", 5);
+
+    if ((psTraceGetLevel(".")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("a")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("b")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("c")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("a.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("a.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("b.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("b.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("c.a")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("c.b")!=PS_UNKNOWN_TRACE_LEVEL) ||
+            (psTraceGetLevel("c.c")!=PS_UNKNOWN_TRACE_LEVEL)) {
+        return 1;
+    }
+
+    return 0;
+}
+
