2 new revisions:

Revision: 3a1ddc2ab95f
Branch:   default
Author:   Robot Framework Developers (robotframew...@gmail.com)
Date:     Thu Jan 30 14:49:34 2014 UTC
Log:      OS: Cleaned up move/copy related tests....
http://code.google.com/p/robotframework/source/detail?r=3a1ddc2ab95f

Revision: 0e012ec1abf1
Branch:   default
Author:   Robot Framework Developers (robotframew...@gmail.com)
Date:     Thu Jan 30 14:54:15 2014 UTC
Log:      OS: Enhanced docs of Move/Copy File(s)
http://code.google.com/p/robotframework/source/detail?r=0e012ec1abf1

==============================================================================
Revision: 3a1ddc2ab95f
Branch:   default
Author:   Robot Framework Developers (robotframew...@gmail.com)
Date:     Thu Jan 30 14:49:34 2014 UTC
Log:      OS: Cleaned up move/copy related tests.

- Tabs to spaces.
- Upper case global variables.
- Use ${base}/item and not ${base}item when construction paths.
- Tests in same order in robot and testdata sides.
- Etc.
http://code.google.com/p/robotframework/source/detail?r=3a1ddc2ab95f

Modified:
/atest/robot/standard_libraries/operating_system/file_and_dir_moving_and_copying.txt
 /atest/robot/standard_libraries/operating_system/move_copy_files.txt
/atest/testdata/standard_libraries/operating_system/file_and_dir_moving_and_copying.txt
 /atest/testdata/standard_libraries/operating_system/move_copy_files.txt

=======================================
--- /atest/robot/standard_libraries/operating_system/file_and_dir_moving_and_copying.txt Thu Jan 30 11:48:40 2014 UTC +++ /atest/robot/standard_libraries/operating_system/file_and_dir_moving_and_copying.txt Thu Jan 30 14:49:34 2014 UTC
@@ -1,66 +1,65 @@
 *** Settings ***
-Documentation Copy File and Copy Dir don't currently have tests but as Move File and Move Dir use them internally they are somehow tested. At least simple tests for them should be added anyway. -Suite Setup Run Tests ${EMPTY} standard_libraries/operating_system/file_and_dir_moving_and_copying.txt
-Force Tags      regression  jybot  pybot
-Resource        atest_resource.txt
+Suite Setup Run Tests ${EMPTY} standard_libraries/operating_system/file_and_dir_moving_and_copying.txt
+Force Tags       regression    pybot    jybot
+Resource         atest_resource.txt

 *** Test Cases ***
 Move File
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy File
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy File With Glob Pattern
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move File With Glob Pattern
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}
+
+Move File With Glob Pattern With Multiple Matches Fails
+    Check Test Case    ${TESTNAME}

 Copy File With Glob Pattern With Multiple Matches Fails
-    Check testcase  ${TESTNAME}
-
-Move File With Glob Pattern With Multiple Matches Fails
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy File With Glob Pattern With No Matches Fails
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move File With Glob Pattern With No Matches Fails
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy File when destination exists should be ok
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy File when destination is a directory
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy File when destination is a directory and file with same name exists
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move File To Existing Dir
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move File To Non-Existing Dir
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move File Using Just File Name
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Moving Non-Existing File Fails
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Directory
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Directory To Existing Dir
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Directory To Non-Existing Dir Tree
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Directory Using Just Dir Name
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Moving Non-Existing Directory Fails
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}
=======================================
--- /atest/robot/standard_libraries/operating_system/move_copy_files.txt Thu Jan 30 11:48:40 2014 UTC +++ /atest/robot/standard_libraries/operating_system/move_copy_files.txt Thu Jan 30 14:49:34 2014 UTC
@@ -1,73 +1,71 @@
 *** Settings ***
-Suite Setup Run Tests ${EMPTY} standard_libraries/operating_system/move_copy_files.txt
-Force Tags      regression  jybot  pybot
-Resource        atest_resource.txt
+Suite Setup Run Tests ${EMPTY} standard_libraries/operating_system/move_copy_files.txt
+Force Tags       regression    pybot    jybot
+Resource         atest_resource.txt

 *** Test Cases ***
-# Test cases for Move Files keyword
 Move One File With Move Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Files fails when no destination
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Files without arguments fails
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Multiple Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move Multiple Files From Multiple Directories
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move List of Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Move List of Files with Patterns
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Moving Non-existing Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

-# Test cases for Copy Files keyword
 Copy One File To Dir With Copy Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy Files fails when no destination
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy Files without arguments fails
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}
+
+Copy Files destination can not be an existing file
+    Check Test Case    ${TESTNAME}
+
+Move Files destination can not be an existing file
+    Check Test Case    ${TESTNAME}
+
+Copy Files directory will be created if it does not exist
+    Check Test Case    ${TESTNAME}
+
+Move Files directory will be created if it does not exist
+    Check Test Case    ${TESTNAME}

 Copy One File To File With Copy Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy Multiple Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy Multiple Files From Multiple Directories
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy List of Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copy List of Files with Patterns
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copying Non-existing Files
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}

 Copying And Moving With backslash in glob pattern
-    Check testcase  ${TESTNAME}
-
-Copy Files destination can not be an existing file
-    Check testcase  ${TESTNAME}
-
-Move Files destination can not be an existing file
-    Check testcase  ${TESTNAME}
-
-Copy Files directory will be created if it does not exist
-    Check testcase  ${TESTNAME}
-
-Move Files directory will be created if it does not exist
-    Check testcase  ${TESTNAME}
+    Check Test Case    ${TESTNAME}
=======================================
--- /atest/testdata/standard_libraries/operating_system/file_and_dir_moving_and_copying.txt Thu Jan 30 11:48:40 2014 UTC +++ /atest/testdata/standard_libraries/operating_system/file_and_dir_moving_and_copying.txt Thu Jan 30 14:49:34 2014 UTC
@@ -40,7 +40,6 @@
     Create File  ${BASE}/file2.txt  contents
     Copy File   ${BASE}/file*.txt   somewhere

-
 Copy File With Glob Pattern With No Matches Fails
     [Documentation]  FAIL Source file 'zoo*bar*not*here' does not exist
     Copy File   zoo*bar*not*here    somewhere
=======================================
--- /atest/testdata/standard_libraries/operating_system/move_copy_files.txt Thu Jan 30 11:48:40 2014 UTC +++ /atest/testdata/standard_libraries/operating_system/move_copy_files.txt Thu Jan 30 14:49:34 2014 UTC
@@ -1,70 +1,70 @@
 *** Settings ***
 Test Setup      Create Test Files For Multi-file Operations
-Test Teardown   Remove Test Files For Multi-file Operations
+Test Teardown   Remove Base Test Directory
 Resource        os_resource.txt

 *** Variables ***
-${SOURCE}=    ${BASE}move_from${/}
-${SOURCE2}=    ${BASE}move_from_dir1${/}
-${SOURCE3}=    ${BASE}move_from_dir2${/}
-${DEST}=    ${BASE}move_to${/}
+${SOURCE}=      ${BASE}${/}move_from
+${SOURCE2}=     ${BASE}${/}move_from_dir1
+${SOURCE3}=     ${BASE}${/}move_from_dir2
+${DEST}=        ${BASE}${/}move_to

 *** Test Cases ***
-
-# Test cases for Move Files keyword
 Move One File With Move Files
-    Move Files    ${source}movecopy-*.txt    ${DEST}
+    Move Files    ${SOURCE}/movecopy-*.txt    ${DEST}
     Directory Should Have Items    ${DEST}
-       ...    movecopy-one.txt
-       Remove Values From List    ${source_files}
-       ...    movecopy-one.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    ...    movecopy-one.txt
+    Remove Values From List    ${SOURCE FILES}
+    ...    movecopy-one.txt
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Move Files fails when no destination
- Run Keyword And Expect Error Must contain destination and at least one source Move Files ${source}movecopy-*.txt
+    [Documentation]  FAIL Must contain destination and at least one source
+    Move Files    ${source}movecopy-*.txt

 Move Files without arguments fails
- Run Keyword And Expect Error Must contain destination and at least one source Move Files
+    [Documentation]  FAIL Must contain destination and at least one source
+    Move Files

 Move Multiple Files
-    Move Files    ${SOURCE}movecopy_multi-*.txt    ${DEST}
+    Move Files    ${SOURCE}/movecopy_multi-*.txt    ${DEST}
     Directory Should Have Items    ${DEST}
-       ...    movecopy_multi-1.txt
-       ...    movecopy_multi-2.txt
-       Remove Values From List    ${source_files}
-       ...    movecopy_multi-1.txt
-       ...    movecopy_multi-2.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    ...    movecopy_multi-1.txt
+    ...    movecopy_multi-2.txt
+    Remove Values From List    ${SOURCE FILES}
+    ...    movecopy_multi-1.txt
+    ...    movecopy_multi-2.txt
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Move Multiple Files From Multiple Directories
-    Move Files    ${BASE}*dir[12]${/}movecopy_multi_dir-*.txt    ${DEST}
+    Move Files    ${BASE}/*dir[12]${/}movecopy_multi_dir-*.txt    ${DEST}
     Directory Should Have Items    ${DEST}
     ...    movecopy_multi_dir-1.txt
     ...    movecopy_multi_dir-2.txt
     ...    movecopy_multi_dir-3.txt
     ...    movecopy_multi_dir-4.txt
-       Remove Values From List    ${source2_files}
+    Remove Values From List    ${SOURCE FILES 2}
     ...    movecopy_multi_dir-1.txt
     ...    movecopy_multi_dir-2.txt
-       Remove Values From List    ${source3_files}
+    Remove Values From List    ${SOURCE FILES 3}
     ...    movecopy_multi_dir-3.txt
     ...    movecopy_multi_dir-4.txt
-    Directory Should Have Items    ${SOURCE2}    @{source2_files}
-    Directory Should Have Items    ${SOURCE3}    @{source3_files}
+    Directory Should Have Items    ${SOURCE2}    @{SOURCE FILES 2}
+    Directory Should Have Items    ${SOURCE3}    @{SOURCE FILES 3}

 Move List of Files
- Move Files ${SOURCE}movecopy_list-1.txt ${SOURCE}movecopy_list-2.txt ${DEST} + Move Files ${SOURCE}/movecopy_list-1.txt ${SOURCE}/movecopy_list-2.txt ${DEST}
     Directory Should Have Items    ${DEST}
     ...    movecopy_list-1.txt
     ...    movecopy_list-2.txt
-       Remove Values From List    ${source_files}
+    Remove Values From List    ${SOURCE FILES}
     ...    movecopy_list-1.txt
     ...    movecopy_list-2.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Move List of Files with Patterns
- Move Files ${SOURCE}movecopy_list-3.txt ${SOURCE}movecopy_list-4.txt - ... ${SOURCE}movecopy_list_pattern-*.txt ${SOURCE}movecopy_list_pattern2-*.txt + Move Files ${SOURCE}/movecopy_list-3.txt ${SOURCE}/movecopy_list-4.txt + ... ${SOURCE}/movecopy_list_pattern-*.txt ${SOURCE}/movecopy_list_pattern2-*.txt
     ...    ${DEST}
     Directory Should Have Items    ${DEST}
     ...    movecopy_list-3.txt
@@ -73,83 +73,84 @@
     ...    movecopy_list_pattern-2.txt
     ...    movecopy_list_pattern2-3.txt
     ...    movecopy_list_pattern2-4.txt
-       Remove Values From List    ${source_files}
+    Remove Values From List    ${SOURCE FILES}
     ...    movecopy_list-3.txt
     ...    movecopy_list-4.txt
     ...    movecopy_list_pattern-1.txt
     ...    movecopy_list_pattern-2.txt
     ...    movecopy_list_pattern2-3.txt
     ...    movecopy_list_pattern2-4.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Moving Non-existing Files
- Move Files ${SOURCE}non_existing.txt ${SOURCE}non_existing_pattern*.txt ${DEST} + Move Files ${SOURCE}/non_existing.txt ${SOURCE}/non_existing_pattern*.txt ${DEST}
     Directory Should Be Empty    ${DEST}
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

-# Test cases for Copy Files keyword
 Copy One File To Dir With Copy Files
-    Copy Files    ${SOURCE}movecopy-*.txt      ${DEST}
+    Copy Files    ${SOURCE}/movecopy-*.txt      ${DEST}
     Directory Should Have Items    ${DEST}
-       ...    movecopy-one.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    ...    movecopy-one.txt
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Copy Files fails when no destination
- Run Keyword And Expect Error Must contain destination and at least one source Copy Files ${source}movecopy-*.txt + [Documentation] FAIL Must contain destination and at least one source
+    Copy Files    ${SOURCE}/movecopy-*.txt

 Copy Files without arguments fails
- Run Keyword And Expect Error Must contain destination and at least one source Copy Files + [Documentation] FAIL Must contain destination and at least one source
+    Copy Files

 Copy Files destination can not be an existing file
- Run Keyword And Expect Error Destination '*' exists and is not a directory - ... Copy Files ${SOURCE}movecopy_list-2.txt ${SOURCE}movecopy_list-1.txt + [Documentation] FAIL Destination '${SOURCE}${/}movecopy_list-1.txt' exists and is not a directory + Copy Files ${SOURCE}/movecopy_list-2.txt ${SOURCE}/movecopy_list-1.txt

 Move Files destination can not be an existing file
- Run Keyword And Expect Error Destination '*' exists and is not a directory - ... Move Files ${SOURCE}movecopy_list-2.txt ${SOURCE}movecopy_list-1.txt + [Documentation] FAIL Destination '${SOURCE}${/}movecopy_list-1.txt' exists and is not a directory + Move Files ${SOURCE}/movecopy_list-2.txt ${SOURCE}/movecopy_list-1.txt

 Copy Files directory will be created if it does not exist
-    Copy Files    ${SOURCE}movecopy_list-1.txt   ${DEST}copieddir
-    Directory Should Have Items   ${DEST}copieddir      movecopy_list-1.txt
+    Copy Files    ${SOURCE}/movecopy_list-1.txt   ${DEST}/copieddir
+ Directory Should Have Items ${DEST}/copieddir movecopy_list-1.txt

 Move Files directory will be created if it does not exist
-    Move Files    ${SOURCE}movecopy_list-1.txt   ${DEST}moveddir
-    Directory Should Have Items   ${DEST}moveddir      movecopy_list-1.txt
+    Move Files    ${SOURCE}/movecopy_list-1.txt   ${DEST}/moveddir
+    Directory Should Have Items   ${DEST}/moveddir      movecopy_list-1.txt

 Copy One File To File With Copy Files
-    Copy Files    ${SOURCE}movecopy-*.txt    ${DEST}copied-movecopy.txt
+    Copy Files    ${SOURCE}/movecopy-*.txt    ${DEST}/copied-movecopy.txt
     Directory Should Have Items    ${DEST}
-       ...    copied-movecopy.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    ...    copied-movecopy.txt
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Copy Multiple Files
-    Copy Files    ${SOURCE}movecopy_multi-*.txt     ${DEST}
+    Copy Files    ${SOURCE}/movecopy_multi-*.txt     ${DEST}
     Directory Should Have Items    ${DEST}
-       ...    movecopy_multi-1.txt
-       ...    movecopy_multi-2.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    ...    movecopy_multi-1.txt
+    ...    movecopy_multi-2.txt
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Copy Multiple Files From Multiple Directories
-    Copy Files    ${BASE}*dir[12]${/}movecopy_multi_dir-*.txt     ${DEST}
+    Copy Files    ${BASE}/*dir[12]${/}movecopy_multi_dir-*.txt     ${DEST}
     Directory Should Have Items    ${DEST}
     ...    movecopy_multi_dir-1.txt
     ...    movecopy_multi_dir-2.txt
     ...    movecopy_multi_dir-3.txt
     ...    movecopy_multi_dir-4.txt
-    Directory Should Have Items    ${SOURCE2}    @{source2_files}
-    Directory Should Have Items    ${SOURCE3}    @{source3_files}
+    Directory Should Have Items    ${SOURCE2}    @{SOURCE FILES 2}
+    Directory Should Have Items    ${SOURCE3}    @{SOURCE FILES 3}

 Copy List of Files
- Copy Files ${SOURCE}movecopy_list-1.txt ${SOURCE}movecopy_list-2.txt ${DEST} + Copy Files ${SOURCE}/movecopy_list-1.txt ${SOURCE}/movecopy_list-2.txt ${DEST}
     Directory Should Have Items    ${DEST}
     ...    movecopy_list-1.txt
     ...    movecopy_list-2.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Copy List of Files with Patterns
-    Copy Files    ${SOURCE}movecopy_list-3.txt
- ... ${SOURCE}movecopy_list-4.txt ${SOURCE}movecopy_list_pattern-*.txt
-    ...    ${SOURCE}movecopy_list_pattern2-*.txt    ${DEST}
+    Copy Files    ${SOURCE}/movecopy_list-3.txt
+ ... ${SOURCE}/movecopy_list-4.txt ${SOURCE}/movecopy_list_pattern-*.txt
+    ...    ${SOURCE}/movecopy_list_pattern2-*.txt    ${DEST}
     Directory Should Have Items    ${DEST}
     ...    movecopy_list-3.txt
     ...    movecopy_list-4.txt
@@ -157,16 +158,16 @@
     ...    movecopy_list_pattern-2.txt
     ...    movecopy_list_pattern2-3.txt
     ...    movecopy_list_pattern2-4.txt
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Copying Non-existing Files
- Copy Files ${SOURCE}non_existing.txt ${SOURCE}non_existing_pattern*.txt ${DEST} + Copy Files ${SOURCE}/non_existing.txt ${SOURCE}/non_existing_pattern*.txt ${DEST}
     Directory Should Be Empty    ${DEST}
-       Directory Should Have Items    ${SOURCE}    @{source_files}
+    Directory Should Have Items    ${SOURCE}    @{SOURCE FILES}

 Copying And Moving With backslash in glob pattern
-    Copy Files    ${BASE}move_from//movecopy_list_pattern-*.txt   ${DEST}
-    Move Files    ${BASE}move_from//movecopy_list_pattern2-*.txt  ${DEST}
+    Copy Files    ${BASE}/move_from//movecopy_list_pattern-*.txt   ${DEST}
+    Move Files    ${BASE}/move_from//movecopy_list_pattern2-*.txt  ${DEST}
     Directory Should Have Items    ${DEST}
     ...    movecopy_list_pattern-1.txt
     ...    movecopy_list_pattern-2.txt
@@ -180,7 +181,7 @@
     Create Directory    ${SOURCE2}
     Create Directory    ${SOURCE3}
     Create Directory    ${DEST}
-    Set Test Variable    @{source_files}
+    Set Test Variable    @{SOURCE FILES}
     ...    movecopy-one.txt
     ...    movecopy_list-1.txt
     ...    movecopy_list-2.txt
@@ -199,22 +200,16 @@
     ...    rename_list_pattern4-8.txt
     ...    rename_multi-1.txt
     ...    rename_multi-2.txt
-    Set Test Variable    @{source2_files}
+    Set Test Variable    @{SOURCE FILES 2}
     ...    movecopy_multi_dir-1.txt
     ...    movecopy_multi_dir-2.txt
-    Set Test Variable    @{source3_files}
+    Set Test Variable    @{SOURCE FILES 3}
     ...    movecopy_multi_dir-3.txt
     ...    movecopy_multi_dir-4.txt
     # All the files possibly used in the test are created
-    :FOR    ${file}    IN    @{source_files}
-    \    Create File    ${SOURCE}${file}
-    :FOR    ${file}    IN    @{source2_files}
-    \    Create File    ${SOURCE2}${file}
-    :FOR    ${file}    IN    @{source3_files}
-    \    Create File    ${SOURCE3}${file}
-
-Remove Test Files For Multi-file Operations
-    Remove Directory    ${SOURCE}    recursive
-    Remove Directory    ${SOURCE2}    recursive
-    Remove Directory    ${SOURCE3}    recursive
-    Remove Directory    ${DEST}    recursive
+    :FOR    ${file}    IN    @{SOURCE FILES}
+    \    Create File    ${SOURCE}/${file}
+    :FOR    ${file}    IN    @{SOURCE FILES 2}
+    \    Create File    ${SOURCE2}/${file}
+    :FOR    ${file}    IN    @{SOURCE FILES 3}
+    \    Create File    ${SOURCE3}/${file}

==============================================================================
Revision: 0e012ec1abf1
Branch:   default
Author:   Robot Framework Developers (robotframew...@gmail.com)
Date:     Thu Jan 30 14:54:15 2014 UTC
Log:      OS: Enhanced docs of Move/Copy File(s)
http://code.google.com/p/robotframework/source/detail?r=0e012ec1abf1

Modified:
 /src/robot/libraries/OperatingSystem.py

=======================================
--- /src/robot/libraries/OperatingSystem.py     Thu Jan 30 12:20:08 2014 UTC
+++ /src/robot/libraries/OperatingSystem.py     Thu Jan 30 14:54:15 2014 UTC
@@ -715,13 +715,18 @@
     # Moving and copying files and directories

     def copy_file(self, source, destination):
-        """Copies the source file into a new destination.
+        """Copies the source file into the destination.
+
+ Source must be an existing file. Starting from Robot Framework 2.8.4, + it can be given as a glob pattern (see `Pattern matching`) that matches + exactly one file. How the destination is interpreted is explained below.

1) If the destination is an existing file, the source file is copied
         over it.

         2) If the destination is an existing directory, the source file is
-        copied into it. A possible file with the same name is overwritten.
+        copied into it. A possible file with the same name as the source is
+        overwritten.

         3) If the destination does not exist and it ends with a path
         separator ('/' or '\\'), it is considered a directory. That
@@ -732,47 +737,56 @@
separator, it is considered a file. If the path to the file does not
         exist, it is created.

- 5) Source can be a glob pattern (see `pattern matching`) that matches
-        exactly one file. New in RF 2.8.4.
+        See also `Copy Files`, `Move File`, and `Move Files`.
         """
         source, destination = self._copy_file(source, destination)
         self._link("Copied file from '%s' to '%s'", source, destination)

     def move_file(self, source, destination):
-        """Moves the source file into a new destination.
+        """Moves the source file into the destination.

- If the source and destination are in the same filesystem, rename operation is used. - Otherwise file is copied to the destination filesystem and then removed from the
-        original filesystem.
+        Arguments have exactly same semantics as with `Copy File` keyword.

-        Arguments have exactly same semantics as with `Copy File` keyword.
+        If the source and destination are on the same filesystem, rename
+        operation is used. Otherwise file is copied to the destination
+        filesystem and then removed from the original filesystem.
+
+        See also `Move Files`, `Copy File`, and `Copy Files`.
         """
source, destination, _ = self._prepare_for_move_or_copy(source, destination)
         shutil.move(source, destination)
         self._link("Moved file from '%s' to '%s'", source, destination)

     def copy_files(self, *sources_and_destination):
-        """Copies specified files to a target directory.
+        """Copies specified files to the target directory.
+
+        Source files can be given as exact paths and as glob patterns (see
+        `Pattern matching`). At least one source must be given, but it is
+        not an error if it is a pattern that does not match anything.
+
+        Last argument must be the destination directory. If the destination
+        does not exist, it will be created.

-        Glob patterns (see `pattern matching`) can be used in source files.
-        Internally the keyword uses `Copy File`
-        keyword for actual copying and thus behaves similarly.
+        Examples:
+        | Copy Files | ${dir}/file1.txt  | ${dir}/file2.txt | ${dir2} |
+        | Copy Files | ${dir}/file-*.txt | ${dir2}          |         |

- Last argument is the destination directory. If the destination does not exist,
-        it will be created.
+        See also `Copy File`, `Move File`, and `Move Files`.

-        New in RF 2.8.4.
+        New in Robot Framework 2.8.4.
         """
source_files, dest_dir = self._parse_sources_and_destination(sources_and_destination)
         for source in source_files:
             self.copy_file(source, dest_dir)

     def move_files(self, *sources_and_destination):
-        """Moves specified files to a target directory.
+        """Moves specified files to the target directory.

         Arguments have exactly same semantics as with `Copy Files` keyword.

-        New in RF 2.8.4.
+        See also `Move File`, `Copy File`, and `Copy Files`.
+
+        New in Robot Framework 2.8.4.
         """
source_files, dest_dir = self._parse_sources_and_destination(sources_and_destination)
         for source in source_files:

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to