Revision: 4494
Author: pekka.klarck
Date: Thu Dec  9 08:55:03 2010
Log: i dont think get_link_path should normcase paths
http://code.google.com/p/robotframework/source/detail?r=4494

Modified:
 /trunk/src/robot/utils/misc.py
 /trunk/utest/utils/test_misc.py

=======================================
--- /trunk/src/robot/utils/misc.py      Mon May 31 05:21:54 2010
+++ /trunk/src/robot/utils/misc.py      Thu Dec  9 08:55:03 2010
@@ -114,8 +114,8 @@
     return url.replace('%5C', '/').replace('%3A', ':').replace('|', ':')

 def _get_pathname(target, base):
-    target = normpath(target)
-    base = normpath(base)
+    target = normpath(target, normcase=False)
+    base = normpath(base, normcase=False)
     if os.path.isfile(base):
         base = os.path.dirname(base)
     if base == target:
=======================================
--- /trunk/utest/utils/test_misc.py     Mon Sep 27 02:25:45 2010
+++ /trunk/utest/utils/test_misc.py     Thu Dec  9 08:55:03 2010
@@ -54,15 +54,12 @@
( 'c:\\path\\to', 'c:\\path\\to\\result_in_same_dir.html', 'result_in_same_dir.html' ), ( 'c:\\path\\to\\dir', 'c:\\path\\to\\result_in_parent_dir.html', '../result_in_parent_dir.html' ), ( 'c:\\path\\to', 'c:\\path\\to\\dir\\result_in_sub_dir.html', 'dir/result_in_sub_dir.html' ), - ( 'c:\\commonprefix\\sucks\\baR', 'c:\\commonprefix\\sucks\\baZ.txt', '../baz.txt' ), + ( 'c:\\commonprefix\\sucks\\baR', 'c:\\commonprefix\\sucks\\baZ.txt', '../baZ.txt' ), ( 'c:\\a\\very\\long\\path', 'c:\\no\\depth\\limitation', '../../../../no/depth/limitation' ), ( 'c:\\windows\\explorer.exe', 'c:\\windows\\path\\to\\existing\\file', 'path/to/existing/file' ), ( 'c:\\path\\to\\identity', 'c:\\path\\to\\identity', 'identity' ),
             ]
-        import robot.utils.normalizing
         for basedir, target, expected in inputs:
-            if robot.utils.normalizing._CASE_INSENSITIVE_FILESYSTEM :
-                expected = expected.lower()
assert_equals(get_link_path(target, basedir).replace('R:', 'r:'), expected,
                          '%s -> %s' % (target, basedir))

Reply via email to