*** Settings ***
Library           FtpLibrary

*** Variables ***
${serverIpAddr}    192.168.1.53
${login}          marcin
${password}       marcin

*** Test Cases ***
Connect and other things
    ftp connect    ${serverIpAddr}    ${login}    ${password}    timeout=30
    comment    ftp connect    ${serverIpAddr}    ${login}    ${password}
    comment    ftp connect    ${serverIpAddr}    ${login}    ${password}    port=21    timeout=20
    comment    ftp connect    ${serverIpAddr}    ${login}    ${password}    21    20
    comment    ftp connect    ${serverIpAddr}    ${login}    ${password}    timeout=35
    get welcome
    send cmd    HELP

Directory creation
    mkd    testDir8
    cwd    testDir8
    ${pwdResult}=    pwd
    Should Be Equal    ${pwdResult}    /home/marcin/testDir8

File upload, rename, ...
    upload file    D:\\rf\\projects\\file.txt    ftpfile.txt
    rename    ftpfile.txt    newFile.txt
    ${sizeOfFile}=    size    newFile.txt
    Should be equal as numbers    ${sizeOfFile}    1

File download and delete
    pwd
    download file    newFile.txt    D:\\rf\\projects\\fileFromFtp.txt
    delete    newFile.txt

List dirs and delete one
    cwd    ..
    @{listOfDirs}=    dir
    Should Contain    @{listOfDirs}[14]    testDir8
    rmd    testDir8

Close
    ftp close
