[PTRun][TimeDate]Unix Time in milliseconds, fix negative unix time input, error message improvement (#29149)

* add unix time in ms

* update dev docs

* unit tests

* fix spell check

* tool tip

* fix negative unix time input, improve regex, update unit tests, improve error message

* Update error handling and tests

* add tests and fix spelling

* small fixes
This commit is contained in:
Heiko
2023-10-18 11:45:00 +02:00
committed by GitHub
parent cd99a2e848
commit 50cb279d2a
11 changed files with 94 additions and 29 deletions

View File

@@ -34,6 +34,11 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests
[DataRow("5:05:10 PM", true, "T", "5:05:10 PM")]
[DataRow("10456", false, "", "")]
[DataRow("u10456", true, "", "")] // Value is UTC and can be different based on system
[DataRow("u-10456", true, "", "")] // Value is UTC and can be different based on system
[DataRow("u+10456", true, "", "")] // Value is UTC and can be different based on system
[DataRow("ums10456", true, "", "")] // Value is UTC and can be different based on system
[DataRow("ums-10456", true, "", "")] // Value is UTC and can be different based on system
[DataRow("ums+10456", true, "", "")] // Value is UTC and can be different based on system
[DataRow("ft10456", true, "", "")] // Value is UTC and can be different based on system
public void ConvertStringToDateTime(string typedString, bool expectedBool, string stringType, string expectedString)
{