2 new revisions:

Revision: 6329be09405a
Branch:   default
Author:   Pekka Klärck
Date:     Mon May  6 13:54:31 2013
Log:      test data format
http://code.google.com/p/robotframework/source/detail?r=6329be09405a

Revision: db61172168dd
Branch:   default
Author:   Pekka Klärck
Date:     Mon May  6 14:08:00 2013
Log: Explicit test for escaping named arguments and non-strings with Run Ke...
http://code.google.com/p/robotframework/source/detail?r=db61172168dd

==============================================================================
Revision: 6329be09405a
Branch:   default
Author:   Pekka Klärck
Date:     Mon May  6 13:54:31 2013
Log:      test data format
http://code.google.com/p/robotframework/source/detail?r=6329be09405a

Added:
/atest/robot/standard_libraries/builtin/run_keyword_variants_variable_handling.txt /atest/testdata/standard_libraries/builtin/run_keyword_variants_variable_handling.txt
Deleted:
/atest/robot/standard_libraries/builtin/run_keyword_variants_variable_handling.html /atest/testdata/standard_libraries/builtin/run_keyword_variants_variable_handling.html
Modified:
 /src/robot/running/arguments/argumentresolver.py

=======================================
--- /dev/null
+++ /atest/robot/standard_libraries/builtin/run_keyword_variants_variable_handling.txt Mon May 6 13:54:31 2013
@@ -0,0 +1,58 @@
+*** Setting ***
+Suite Setup Run Tests ${EMPTY} standard_libraries/builtin/run_keyword_variants_variable_handling.txt
+Force Tags        regression    jybot    pybot
+Resource          atest_resource.txt
+
+*** Variable ***
+@{EXPECTED ARGS}    c:\\\\temp\\\\foo    \\\${notvar}
+
+*** Test Case ***
+Variable Values Should Not Be Visible As Keyword's Arguments
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check KW Arguments    ${tc.kws[0]}    My UK    Log    \${OBJECT}
+    Check KW Arguments    ${tc.kws[0].kws[0]}    Log    \${OBJECT}
+ Check KW Arguments ${tc.kws[0].kws[0].kws[0]} \${name} \@{args}
+    Check KW Arguments    ${tc.kws[0].kws[0].kws[0].kws[0]}    \@{args}
+
+Run Keyword When Keyword and Arguments Are in List Variable
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check KW Arguments    ${tc.kws[0].kws[0]}    @{EXPECTED ARGS}
+    Check KW Arguments    ${tc.kws[1].kws[0]}    \\\${notvar}
+
+Run Keyword If When Arguments are In Multiple List
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check Keyword Arguments And Messages    ${tc}
+
+Run Keyword When Arguments are Not In First Lists
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check Keyword Arguments And Messages    ${tc}
+
+Run Keyword When Keyword And Arguments In Scalar After Empty Lists
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check Keyword Arguments And Messages    ${tc}
+
+Run Keyword When Keyword And String Arguments After Empty Lists
+    Check Test Case    ${TEST NAME}
+
+Run Keyword If When Not Enough Arguments
+    Check Test Case    ${TEST NAME}
+
+Run Keyword When Run Keyword Does Not Take Keyword
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check Keyword Arguments And Messages    ${tc}
+
+Run Keyword If With List And Two Arguments That needs to Be Processed
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check Keyword Arguments And Messages    ${tc}
+
+Run Keyword If With List And One Argument That needs to Be Processed
+    ${tc} =    Check Test Case    ${TEST NAME}
+    Check Keyword Arguments And Messages    ${tc}
+
+*** Keyword ***
+Check Keyword Arguments And Messages
+    [Arguments]    ${tc}
+    Check KW Arguments    ${tc.kws[0].kws[0]}    \@{ARGS}
+    Check KW Arguments    ${tc.kws[0].kws[0].kws[0]}    \@{args}
+ Check Log Message ${tc.kws[0].kws[0].kws[0].msgs[0]} c:\\temp\\foo
+    Check Log Message    ${tc.kws[0].kws[0].kws[0].msgs[1]}    \${notvar}
=======================================
--- /dev/null
+++ /atest/testdata/standard_libraries/builtin/run_keyword_variants_variable_handling.txt Mon May 6 13:54:31 2013
@@ -0,0 +1,56 @@
+*** Setting ***
+Library           RegisteringLibrary.py
+Variables         variable.py
+
+*** Variable ***
+@{NEEDS ESCAPING}    c:\\temp\\foo    \${notvar}
+@{KEYWORD AND ARG WHICH NEEDS ESCAPING}    \\Log Many    \${notvar}
+@{KEYWORD AND ARGS WHICH NEEDS ESCAPING}    \\Log Many    @{NEEDS ESCAPING}
+@{EMPTY}
+@{KEYWORD}        \\Log Many
+@{EXPRESSION}     ${TRUE}
+@{ARGS}           @{NEEDS ESCAPING}
+${KEYWORD}        \\Log Many
+
+*** Test Case ***
+Variable Values Should Not Be Visible As Keyword's Arguments
+    Run Keyword    My UK    Log    ${OBJECT}
+
+Run Keyword When Keyword and Arguments Are in List Variable
+    Run Keyword    @{KEYWORD AND ARGS WHICH NEEDS ESCAPING}
+    Run Keyword    @{KEYWORD AND ARG WHICH NEEDS ESCAPING}
+
+Run Keyword If When Arguments are In Multiple List
+    Run Keyword If    @{EXPRESSION}    @{KEYWORD}    @{ARGS}
+
+Run Keyword When Arguments are Not In First Lists
+ Run Keyword @{EMPTY} @{EMPTY} @{EMPTY} @{KEYWORD} @{ARGS}
+
+Run Keyword When Keyword And Arguments In Scalar After Empty Lists
+    Run Keyword    @{EMPTY}    @{EMPTY}    ${KEYWORD}    @{ARGS}
+
+Run Keyword When Keyword And String Arguments After Empty Lists
+    [Documentation]    FAIL Expected Failure
+    Run Keyword    @{EMPTY}    @{EMPTY}    Fail    Expected Failure
+
+Run Keyword If When Not Enough Arguments
+ [Documentation] FAIL Keyword 'BuiltIn.Run Keyword If' expected at least 2 arguments, got 1.
+    Run Keyword If    @{EMPTY}    @{EMPTY}    @{EMPTY}    @{EXPRESSION}
+
+Run Keyword When Run Keyword Does Not Take Keyword
+    Run Keyword Without Keyword    @{ARGS}
+
+Run Keyword If With List And Two Arguments That needs to Be Processed
+    Run Keyword If    @{EMPTY}    ${TRUE}    \\Log Many    @{ARGS}
+
+Run Keyword If With List And One Argument That needs to Be Processed
+    Run Keyword If    @{EXPRESSION}    \\Log Many    @{ARGS}
+
+*** Keyword ***
+My UK
+    [Arguments]    ${name}    @{args}
+    Run Keyword    ${name}    @{args}
+
+\Log Many
+    [Arguments]    @{args}
+    Log Many    @{args}
=======================================
--- /atest/robot/standard_libraries/builtin/run_keyword_variants_variable_handling.html Mon Apr 12 05:17:10 2010
+++ /dev/null
@@ -1,232 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta name="generator" content="HTML Tidy for Cygwin (vers 1st September 2004), see www.w3.org">
-<style type="text/css">
-html { font-family: Arial,Helvetica,sans-serif;
-background-color: white;
-color: black;
-}
-p { max-width: 60em;
-}
-table { border-collapse: collapse;
-empty-cells: show;
-margin: 1em 0em;
-border: 0.1em solid black;
-}
-th, td {
-border-style: solid;
-border-width: 0.05em 0.1em;
-border-color: black;
-padding: 0.1em 0.2em;
-height: 1.5em;
-}
-th {
-background-color: rgb(192, 192, 192);
-color: black;
-border-width: 0.1em;
-font-weight: bold;
-text-align: center;
-text-transform: capitalize;
-letter-spacing: 0.1em;
-}
-/* Widths of named columns */
-col.name {
-width: 10em;
-}
-.action , .value, .arg {
-width: 15em;
-}
-/* Properties for the name column - td:first-child should work in CSS 2.1 avare browsers (tested in Firefox)
-- col.name is against specs but works in IE
-*/
-td:first-child, col.name {
-background-color: rgb(240, 240, 240);
-text-transform: capitalize;
-letter-spacing: 0.1em;
-}
-th { font-style: normal; } /* required for IE */
-</style>
-
-<title>Robot Test Cases</title><link type="text/css" href="resources/css/testdata.css" rel="stylesheet"></head>
-<body>
-<h1>Robot Test Cases for Run Keyword Variants Variable Handling</h1>
-<br>
-<table border="1">
-<colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-<thead>
-<tr>
-<th>Setting</th>
-<th>Value</th>
-<th>Value</th>
-<th>value</th>
-<th>Value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>Resource</td>
-<td>atest_resource.txt</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td align="undefined" valign="undefined">Document</td>
-<td align="undefined" valign="undefined">Tests for Run Keyword Variants Variable Handling</td><td align="undefined" valign="undefined"></td>
-<td align="undefined" valign="undefined"></td>
-<td align="undefined" valign="undefined"></td>
-</tr>
-<tr>
-<td>Force Tags</td>
-<td>regression</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td align="undefined" valign="undefined">Default Tags</td>
-<td>jybot</td>
-<td>pybot</td>
-<td align="undefined" valign="undefined"></td>
-<td align="undefined" valign="undefined"></td>
-</tr>
-<tr>
-<td>Suite Setup</td>
-<td>Run Tests</td>
-<td></td>
-<td>standard_libraries${/}builtin${/}run_keyword_variants_variable_handling.html</td>
-<td></td>
-</tr>
-</tbody>
-</table>
-<br>
-<table border="1">
-<colgroup span="99"><col class="name"><col class="value"></colgroup>
-<thead>
-<tr>
-<th>Variable</th>
-<th>Value</th>
-<th>Value</th>
-<th>Value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>@{EXPECTED ARGS}<br></td>
-<td><span class="arg">c:\\\\temp\\\\foo</span></td><td><span class="arg">\\\${notvar}</span></td>
-
-<td></td>
-</tr>
-</tbody>
-</table>
-<br>
-<table border="1">
-<colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-<thead>
-<tr>
-<th>Test Case</th>
-<th>Action</th>
-<th>Argument</th>
-<th>Argument</th>
-<th>Argument</th>
-<th>Argument</th>
-</tr>
-</thead>
-<tbody>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<tr><td>Variable Values Should Not Be Visible As Keyword's Arguments </td><td>${tc} =</td><td>Check Test Case</td><td>Variable Values Should Not Be Visible As Keyword's Arguments</td><td></td><td></td></tr><tr>
-<td></td>
-<td>Check KW Arguments</td>
-<td>${tc.kws[0]}</td>
-<td>My UK</td>
-<td>Log</td>
-<td>\${OBJECT}</td>
-</tr><tr><td></td><td>Check KW Arguments</td><td>${tc.kws[0].kws[0]}</td><td>Log</td><td>\${OBJECT}</td><td></td></tr><tr><td></td><td>Check KW Arguments</td><td>${tc.kws[0].kws[0].kws[0]}</td><td>\${name}</td><td>\@{args}</td><td></td></tr><tr><td></td><td>Check KW Arguments</td><td>${tc.kws[0].kws[0].kws[0].kws[0]}</td><td>\@{args}</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword When Keyword and Arguments Are in List Variable</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword When Keyword and Arguments Are in List Variable</td><td></td><td></td></tr><tr><td></td><td>Check KW Arguments</td><td>${tc.kws[0].kws[0]}</td><td>@{EXPECTED ARGS}</td><td></td><td></td></tr><tr><td></td><td>Check KW Arguments</td><td>${tc.kws[1].kws[0]}</td><td><span class="arg">\\\${notvar}</span></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword If When Arguments are In Multiple List</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword If When Arguments are In Multiple List</td><td></td><td></td></tr><tr><td></td><td>Check Keyword Arguments And Messages</td><td>${tc}</td><td><br></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword When Arguments are Not In First Lists</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword When Arguments are Not In First Lists</td><td></td><td></td></tr><tr><td></td><td>Check Keyword Arguments And Messages</td><td>${tc}</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword When Keyword And Arguments In Scalar After Empty Lists</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword When Keyword And Arguments In Scalar After Empty Lists</td><td></td><td></td></tr><tr><td></td><td>Check Keyword Arguments And Messages</td><td>${tc}</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword When Keyword And String Arguments After Empty Lists</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword When Keyword And String Arguments After Empty Lists</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword If When Not Enough Arguments</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword If When Not Enough Arguments</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword When Run Keyword Does Not Take Keyword</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword When Run Keyword Does Not Take Keyword</td><td></td><td></td></tr><tr><td></td><td>Check Keyword Arguments And Messages</td><td>${tc}</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword If With List And Two Arguments That needs to Be Processed</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword If With List And Two Arguments That needs to Be Processed</td><td></td><td></td></tr><tr><td></td><td>Check Keyword Arguments And Messages</td><td>${tc}</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Run Keyword If With List And One Argument That needs to Be Processed</td><td>${tc} =</td><td>Check Test Case</td><td>Run Keyword If With List And One Argument That needs to Be Processed</td><td></td><td></td></tr><tr><td></td><td>Check Keyword Arguments And Messages</td><td>${tc}</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
-</tbody>
-</table>
-<br>
-<table border="1">
-<colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-<thead>
-<tr>
-<th>Keyword</th>
-<th>Action</th>
-<th>Argument</th>
-<th>Argument</th>
-<th>Argument</th>
-</tr>
-</thead>
-<tbody>
-
-
-
-
-
-
-
-
-
-<tr>
-<td>Check Keyword Arguments And Messages</td>
-<td>[Arguments]</td>
-<td>${tc}</td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>Check KW Arguments</td><td>${tc.kws[0].kws[0]}</td><td>\@{ARGS}</td>
-
-
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>Check KW Arguments</td>
-<td>${tc.kws[0].kws[0].kws[0]}</td>
-<td>\@{args}</td>
-<td></td>
-</tr>
-<tr><td></td><td>Check Log Message</td><td>${tc.kws[0].kws[0].kws[0].msgs[0]}</td><td>c:\\temp\\foo</td><td></td></tr><tr>
-<td></td>
-<td>Check Log Message</td><td>${tc.kws[0].kws[0].kws[0].msgs[1]}</td>
-
-<td>\<span class="arg">${notvar}</span></td>
-<td></td>
-</tr>
-</tbody>
-</table>
-</body></html>
=======================================
--- /atest/testdata/standard_libraries/builtin/run_keyword_variants_variable_handling.html Thu Sep 11 04:41:06 2008
+++ /dev/null
@@ -1,4113 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  <style type="text/css">
-html { font-family: Arial,Helvetica,sans-serif;
-background-color: white;
-color: black;
-}
-p { max-width: 60em;
-}
-table { border-collapse: collapse;
-empty-cells: show;
-margin: 1em 0em;
-border: 0.1em solid black;
-}
-th, td {
-border-style: solid;
-border-width: 0.05em 0.1em;
-border-color: black;
-padding: 0.1em 0.2em;
-height: 1.5em;
-}
-th {
-background-color: rgb(192, 192, 192);
-color: black;
-border-width: 0.1em;
-font-weight: bold;
-text-align: center;
-text-transform: capitalize;
-letter-spacing: 0.1em;
-}
-/* Widths of named columns */
-col.name {
-width: 10em;
-}
-.action , .value, .arg {
-width: 15em;
-}
-/* Properties for the name column - td:first-child should work in CSS 2.1 avare browsers (tested in Firefox)
-- col.name is against specs but works in IE
-*/
-td:first-child, col.name {
-background-color: rgb(240, 240, 240);
-text-transform: capitalize;
-letter-spacing: 0.1em;
-}
-th { font-style: normal; } /* required for IE */
-  </style>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <title>Robot Test Cases</title><link type="text/css" href="resources/css/testdata.css" rel="stylesheet"></head>
-<body>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<h1>Robot Test Cases for Built-In Run Keyword</h1>
-
-
-<span style="font-weight: bold;">&nbsp;&nbsp; &nbsp;</span>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<table border="1">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup> <thead><tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Setting</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </thead> <tbody>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <tr><td>Library</td><td>RegisteringLibrary.py</td><td></td><td></td><td></td></tr><tr><td>variables</td><td>variable.py</td><td></td><td></td><td></td></tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </tbody>
-</table>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<br>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<table border="1">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup> <thead><tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Variable</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Value</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </thead> <tbody>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td align="undefined" valign="undefined">@{NEEDS ESCAPING}</td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td align="undefined" valign="undefined">c:\\temp\\foo</td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td align="undefined" valign="undefined">\${notvar}</td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    </tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td>@{KEYWORD AND ARG WHICH NEEDS ESCAPING}</td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td>\\Log Many</td><td>\${notvar}</td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-      <td></td>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </tr><tr><td>@{KEYWORD AND ARGS WHICH NEEDS ESCAPING}</td><td>\\Log Many</td><td>@{NEEDS ESCAPING}</td><td></td><td></td></tr><tr><td>@{EMPTY}</td><td></td><td></td><td></td><td></td></tr><tr><td>@{KEYWORD}</td><td>\\Log Many</td><td></td><td></td><td></td></tr><tr><td>@{EXPRESSION}</td><td>${TRUE}</td><td></td><td></td><td></td></tr><tr><td>@{ARGS}</td><td>@{NEEDS ESCAPING}</td><td></td><td></td><td></td></tr><tr><td>${KEYWORD}</td><td>\\Log Many</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </tbody>
-</table>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<br>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<table border="1">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead><tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Test Case</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Action</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Argument</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Argument</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Argument</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    <th>Argument</th>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  </thead> <tbody>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
***The diff for this file has been truncated for email.***
=======================================
--- /src/robot/running/arguments/argumentresolver.py Mon May 6 07:00:15 2013 +++ /src/robot/running/arguments/argumentresolver.py Mon May 6 13:54:31 2013
@@ -52,7 +52,6 @@
         return positional, named

     def _is_named(self, arg):
-        # TODO: When is arg not string??
         if not isinstance(arg, basestring) or '=' not in arg:
             return False
         name = arg.split('=')[0]

==============================================================================
Revision: db61172168dd
Branch:   default
Author:   Pekka Klärck
Date:     Mon May  6 14:08:00 2013
Log: Explicit test for escaping named arguments and non-strings with Run Keywords
http://code.google.com/p/robotframework/source/detail?r=db61172168dd

Modified:
 /atest/robot/standard_libraries/builtin/run_keyword.txt
 /atest/testdata/standard_libraries/builtin/run_keyword.txt
 /src/robot/utils/escaping.py

=======================================
--- /atest/robot/standard_libraries/builtin/run_keyword.txt Fri Nov 30 02:51:54 2012 +++ /atest/robot/standard_libraries/builtin/run_keyword.txt Mon May 6 14:08:00 2013
@@ -23,6 +23,11 @@
     ${tc} =    Check test Case    ${TEST NAME}
     Check Log Message    ${tc.kws[1].kws[0].msgs[0]}    c:\\temp\\foo
     Check Log Message    ${tc.kws[1].kws[0].msgs[1]}    \${notvar}
+
+Escaping Arguments From Opened List Variable
+    ${tc} =    Check test Case    ${TEST NAME}
+    Check Log Message    ${tc.kws[1].kws[0].msgs[0]}    message=foo
+    Check Log Message    ${tc.kws[3].kws[0].msgs[0]}    42

 Run Keyword With UK
     ${tc} =    Check test Case    ${TEST NAME}
=======================================
--- /atest/testdata/standard_libraries/builtin/run_keyword.txt Sat Jul 9 14:15:55 2011 +++ /atest/testdata/standard_libraries/builtin/run_keyword.txt Mon May 6 14:08:00 2013
@@ -2,7 +2,7 @@
 Library         Operating System

 *** Variables ***
-@{NEEDS ESCAPING}  c:\\temp\\foo  \${notvar}
+@{NEEDS ESCAPING}  c:\\temp\\foo  \${notvar}  ${42}
 ${FAIL KW}  Fail

 *** Test Cases ***
@@ -19,15 +19,21 @@

 Run Keyword Returning Value
     ${ret} =  Run Keyword  Set Variable  hello world
-    Equals  ${ret}  hello world
+    Should Be Equal  ${ret}  hello world
     ${ret} =  Run Keyword  Evaluate  1+2
-    Equals  ${ret}  ${3}
+    Should Be Equal  ${ret}  ${3}

 Run Keyword With Arguments That Needs To Be Escaped
     Run Keyword  Directory Should Exist  ${CURDIR}
     Run Keyword  Log Many  @{NEEDS ESCAPING}  ${CURDIR}  \
     ${ret} =  Run Keyword  Create List  @{NEEDS ESCAPING}
-    Should Be True  ${ret} == @{NEEDS ESCAPING}
+    Should Be Equal  ${ret}  ${NEEDS ESCAPING}
+
+Escaping Arguments From Opened List Variable
+    @{named} =    Create List    Log    message=foo    INFO
+    Run Keyword    @{named}
+    @{nonstr} =    Create List    Log    ${42}    INFO
+    Run Keyword    @{nonstr}

 Run Keyword With UK
     [Documentation]  FAIL Expected failure in UK
@@ -82,9 +88,8 @@

 Timeoutted UK Passing
     [Timeout]  5 seconds
-    NOOP
+    No Operation

 Timeoutted UK Timeouting
     [Timeout]  300 milliseconds
     Sleep  1 second
-
=======================================
--- /src/robot/utils/escaping.py        Thu Jun  7 07:22:47 2012
+++ /src/robot/utils/escaping.py        Mon May  6 14:08:00 2013
@@ -16,7 +16,7 @@


 _ESCAPE_RE = re.compile(r'(\\+)([^\\]{0,2})')   # escapes and nextchars
-_SEQS_TO_BE_ESCAPED = ('\\', '${', '@{', '%{', '&{', '*{' , '=')
+_SEQS_TO_BE_ESCAPED = ('\\', '${', '@{', '%{', '&{', '*{', '=')


 def escape(item):

--

--- 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to