Author: laukpe
Date: Thu Sep 18 05:20:50 2008
New Revision: 758
Modified:
trunk/atest/testdata/standard_libraries/operating_system/path.html
trunk/src/robot/libraries/OperatingSystem.py
Log:
better doc and even more tests for split_extension
Modified: trunk/atest/testdata/standard_libraries/operating_system/path.html
==============================================================================
--- trunk/atest/testdata/standard_libraries/operating_system/path.html
(original)
+++ trunk/atest/testdata/standard_libraries/operating_system/path.html Thu
Sep 18 05:20:50 2008
@@ -3778,7 +3778,8 @@
- <tr>
+ <tr><td></td><td align="undefined" valign="undefined">Normalize Path
And
+Check</td><td align="undefined" valign="undefined">abc${/ *
10}def</td><td>abc${/}def</td><td></td><td></td></tr><tr>
@@ -5361,7 +5362,7 @@
<td align="undefined" valign="undefined">
-p1${/}..///////p2${/}abc.ext</td>
+p1${/}..${/}p2${/}${/}${/}abc.ext</td>
Modified: trunk/src/robot/libraries/OperatingSystem.py
==============================================================================
--- trunk/src/robot/libraries/OperatingSystem.py (original)
+++ trunk/src/robot/libraries/OperatingSystem.py Thu Sep 18 05:20:50 2008
@@ -945,14 +945,11 @@
The given path is first normalized (e.g. possible trailing
path separators removed, special directories '..' and '.'
removed). The base path and extension are returned as separate
- components so that extension separator ('.') is removed. If
- the path contains no extension, an empty string is returned
- for it.
-
- Possible leading dots in in the file name are considered to be
- part of the basename, and not extension separators, starting
- from Robot Framework 2.0.2. With earlier versions, the last
- example below would return 'file' as an extension.
+ components so that the dot used as an extension separator is
+ removed. If the path contains no extension, an empty string is
+ returned for it. Starting from Robot Framework 2.0.2, possible
+ leading and trailing dots in the file name are never
+ considered to be extension separators.
Examples:
| ${path} | ${ext} = | Split Extension | file.extension |