mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-16 11:55:27 -05:00
62 lines
3.2 KiB
Diff
62 lines
3.2 KiB
Diff
|
Patch submitted upstream: https://github.com/robotframework/robotframework/pull/4286.
|
||
|
|
||
|
diff --git a/atest/robot/standard_libraries/operating_system/modified_time.robot b/atest/robot/standard_libraries/operating_system/modified_time.robot
|
||
|
index d144ffd34..c7681e61d 100644
|
||
|
--- a/atest/robot/standard_libraries/operating_system/modified_time.robot
|
||
|
+++ b/atest/robot/standard_libraries/operating_system/modified_time.robot
|
||
|
@@ -8,7 +8,7 @@ ${TESTFILE} %{TEMPDIR}${/}robot-os-tests${/}f1.txt
|
||
|
*** Test Cases ***
|
||
|
Get Modified Time As Timestamp
|
||
|
${tc} = Check Test Case ${TESTNAME}
|
||
|
- Should Match Regexp ${tc.kws[0].msgs[0].message} Last modified time of '<a href=.*</a>' is 20\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d
|
||
|
+ Should Match Regexp ${tc.kws[0].msgs[0].message} Last modified time of '<a href=.*</a>' is \\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d
|
||
|
|
||
|
Get Modified Time As Seconds After Epoch
|
||
|
${tc} = Check Test Case ${TESTNAME}
|
||
|
diff --git a/atest/testdata/standard_libraries/builtin/get_time.robot b/atest/testdata/standard_libraries/builtin/get_time.robot
|
||
|
index 9847d8c42..24ce732ca 100644
|
||
|
--- a/atest/testdata/standard_libraries/builtin/get_time.robot
|
||
|
+++ b/atest/testdata/standard_libraries/builtin/get_time.robot
|
||
|
@@ -11,18 +11,18 @@ Get Time As Timestamp
|
||
|
|
||
|
Get Time As Seconds After Epoch
|
||
|
${time} = Get Time epoch
|
||
|
- Should Be True 1000000000 < ${time} < 2000000000
|
||
|
+ Should Be True 0 < ${time}
|
||
|
|
||
|
Get Time As Parts
|
||
|
@{time} = Get Time year, month, day, hour, min, sec
|
||
|
- Should Be True 2000 < ${time}[0] < 2100
|
||
|
+ Should Match Regexp ${time}[0] \\d{4}
|
||
|
Should Be True 1 <= int('${time}[1]') <= 12
|
||
|
Should Be True 1 <= int('${time}[2]') <= 31
|
||
|
Should Be True 0 <= int('${time}[3]') <= 23
|
||
|
Should Be True 0 <= int('${time}[4]') <= 59
|
||
|
Should Be True 0 <= int('${time}[5]') <= 59
|
||
|
${year} ${min} ${sec} = Get Time seconds and minutes and year and whatnot
|
||
|
- Should Be True 2000 < ${year} < 2100
|
||
|
+ Should Match Regexp ${year} \\d{4}
|
||
|
Should Be True 0 <= int('${min}') <= 59
|
||
|
Should Be True 0 <= int('${sec}') <= 59
|
||
|
|
||
|
diff --git a/atest/testdata/standard_libraries/operating_system/modified_time.robot b/atest/testdata/standard_libraries/operating_system/modified_time.robot
|
||
|
index 9489b3c9c..c712ebaed 100644
|
||
|
--- a/atest/testdata/standard_libraries/operating_system/modified_time.robot
|
||
|
+++ b/atest/testdata/standard_libraries/operating_system/modified_time.robot
|
||
|
@@ -14,13 +14,13 @@ Get Modified Time As Timestamp
|
||
|
|
||
|
Get Modified Time As Seconds After Epoch
|
||
|
${dirtime} = Get Modified Time ${CURDIR} epoch
|
||
|
- Should Be True 1000000000 < ${dirtime} < 2000000000
|
||
|
+ Should Be True ${dirtime} > 0
|
||
|
${current} = Get Time epoch
|
||
|
Should Be True ${current} >= ${dirtime}
|
||
|
|
||
|
Get Modified Time As Parts
|
||
|
${year} = Get Modified Time ${CURDIR} year
|
||
|
- Should Be True 2000 < ${year} < 2100
|
||
|
+ Should Match Regexp ${year} \\d{4}
|
||
|
${yyyy} ${mm} ${dd} = Get Modified Time ${CURDIR} year, month, day
|
||
|
Should Be Equal ${yyyy} ${year}
|
||
|
# Must use `int('x')` because otherwise 08 and 09 are considered octal
|