You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ts...@apache.org on 2018/03/21 18:03:51 UTC

logging-log4cxx git commit: errorhandlertestcase succeeded in Windows, because it strips "/." automatically. The new path fails on Linux and Windows reliably.

Repository: logging-log4cxx
Updated Branches:
  refs/heads/master a85b85fb2 -> 78c60461f


errorhandlertestcase succeeded in Windows, because it strips "/." automatically. The new path fails on Linux and Windows reliably.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/commit/78c60461
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/tree/78c60461
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/diff/78c60461

Branch: refs/heads/master
Commit: 78c60461f0ae2cfa016150da4bc445ffd7b8f854
Parents: a85b85f
Author: Thorsten Schöning <ts...@am-soft.de>
Authored: Wed Mar 21 19:03:47 2018 +0100
Committer: Thorsten Schöning <ts...@am-soft.de>
Committed: Wed Mar 21 19:03:47 2018 +0100

----------------------------------------------------------------------
 src/test/resources/input/xml/fallback1.xml | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4cxx/blob/78c60461/src/test/resources/input/xml/fallback1.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/input/xml/fallback1.xml b/src/test/resources/input/xml/fallback1.xml
index 5f71105..b0b8ff8 100644
--- a/src/test/resources/input/xml/fallback1.xml
+++ b/src/test/resources/input/xml/fallback1.xml
@@ -27,9 +27,17 @@
       <appender-ref ref="FALLBACK" />
     </errorHandler>
 
-    <!-- We need a most likely invalid file name on most file systems to trigger FALLBACK. -->
-    <param name="File"		value="output/xyz/."	/>
-    <param name="Append"	value="false"			/>
+    <!--
+        The following path is carefully designed to fail on Linux and Windows,
+        so that the appender FALLBACK is used instead and the test succeeds in
+        the end. Linux considers "." as current directory, which can not be
+        created as a file, while Windows strips "/."[1] internally and fails at
+        ":", which is an invalid name.
+
+        [1]: https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations
+    -->
+    <param name="File"      value="output/xyz/:/."   />
+    <param name="Append"    value="false"            />
 
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/>