Revision: 4004
Author: jprantan
Date: Tue Aug 31 04:08:08 2010
Log: Added tests for fix in showing multiple warnings from one deprecation,
issue 636.
http://code.google.com/p/robotframework/source/detail?r=4004
Modified:
/trunk/atest/robot/variables/same_basename_is_deprecated.txt
/trunk/atest/testdata/variables/same_basename_is_deprecated.txt
=======================================
--- /trunk/atest/robot/variables/same_basename_is_deprecated.txt Fri Aug 27
01:11:30 2010
+++ /trunk/atest/robot/variables/same_basename_is_deprecated.txt Tue Aug 31
04:08:08 2010
@@ -17,7 +17,10 @@
Set Test/Suite/Global Variable
${tc} = Check Test Case ${TESTNAME}
Verify deprecation warning \...@{set} \${SET}
- Check Log Message ${tc.kws[1].messages[0]} Using same base name
with scalar and list variables is deprecated. Please change
either '\...@{set}' or '\${SET}' before Robot Framework 2.6. WARN
+ Check Log Message ${tc.kws[2].messages[0]} Using same base name
with scalar and list variables is deprecated. Please change
either '\...@{set}' or '\${SET}' before Robot Framework 2.6. WARN
+ Length Should Be ${tc.kws[2].messages} 2
+ Length Should Be ${tc.kws[4].messages} 2
+ Length Should Be ${tc.kws[6].messages} 2
Variable File
Check Test Case ${TESTNAME}
@@ -27,6 +30,13 @@
Check Test Case ${TESTNAME}
Verify deprecation warning \...@{table2} \${table2}
+Set Variables In User Keyword
+ ${tc} = Check Test Case ${TESTNAME}
+ Length Should Be ${tc.kws[1].kws[0].kws[0].kws[0].messages} 2
+ Length Should Be ${tc.kws[1].kws[0].kws[0].kws[1].messages} 2
+
+Set Variable Is Suite Setup
+ Length Should Be ${SUITE.setup.kws[1].messages} 2
*** Keywords ***
=======================================
--- /trunk/atest/testdata/variables/same_basename_is_deprecated.txt Sat Mar
27 15:36:19 2010
+++ /trunk/atest/testdata/variables/same_basename_is_deprecated.txt Tue Aug
31 04:08:08 2010
@@ -1,5 +1,6 @@
*** Settings ***
Variables same_basename.py
+Suite Setup Setup
*** Variables ***
${TABLE}= Value
@@ -18,10 +19,14 @@
Should Be True @{assign} == 'a b c'.split()
Set Test/Suite/Global Variable
- Set Test Variable ${set} -value-
- Set Suite Variable @{SET} 1 2 3
- Should Be Equal ${set} -value-
- Should Be True @{set} == '1 2 3'.split()
+ ${SET} = Set Variable initial
+ Should Be Equal ${SET} initial
+ Set Test Variable @{SET} test var
+ Should Be True @{set} == 'test var'.split()
+ Set Suite Variable @{SET} suite var
+ Should Be True @{set} == 'suite var'.split()
+ Set Global Variable @{SET} global var
+ Should Be True @{set} == 'global var'.split()
Variable File
Should Be Equal ${VARFILE} VaLuE
@@ -31,3 +36,22 @@
@{table2}= Create List 42
Should Be Equal ${TABLE2} Value2
Should Be True @{table2} == ['42']
+
+Set Variables In User Keyword
+ ${set} = Set Variable initial
+ UK
+
+*** Keywords ***
+UK
+ Another UK
+
+Another UK
+ Warning In UK
+
+Warning In UK
+ @{set} = Create List deprecated usage
+ Set Test Variable @{set} another deprecated usage
+
+Setup
+ Set Suite Variable ${setup} suite
+ Set Suite Variable @{setup} suite var