diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index e82bfbc2e9..07d9ee9723 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1213,6 +1213,7 @@ QUEUESYNC QUNS RAII RAlt +randi Rasterize RAWINPUTDEVICE RAWINPUTHEADER diff --git a/Directory.Packages.props b/Directory.Packages.props index 90b44e2b65..fe027f856a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -22,7 +22,7 @@ - + diff --git a/NOTICE.md b/NOTICE.md index 744c47f650..73d06525c6 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1315,7 +1315,7 @@ EXHIBIT A -Mozilla Public License. - hyjiacan.pinyin4net 4.1.1 - Interop.Microsoft.Office.Interop.OneNote 1.1.0.2 - LazyCache 2.4.0 -- Mages 2.0.2 +- Mages 3.0.0 - Markdig.Signed 0.34.0 - MessagePack 2.5.187 - Microsoft.Bcl.AsyncInterfaces 9.0.0 diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/ExtendedCalculatorParserTests.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/ExtendedCalculatorParserTests.cs index 3c61e966be..d62fbf668f 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/ExtendedCalculatorParserTests.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/ExtendedCalculatorParserTests.cs @@ -192,6 +192,11 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests [DataRow("cos", false)] [DataRow("abs", false)] [DataRow("1+1.1e3", true)] + [DataRow("randi(8)", true)] + [DataRow("randi()", false)] + [DataRow("randi(0.5)", true)] + [DataRow("rand()", true)] + [DataRow("rand(0.5)", false)] public void InputValid_TestValid_WhenCalled(string input, bool valid) { // Act diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/CalculateHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/CalculateHelper.cs index ea1862bbf0..59bc414bda 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/CalculateHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/CalculateHelper.cs @@ -15,7 +15,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator @"^(" + @"%|" + @"ceil\s*\(|floor\s*\(|exp\s*\(|max\s*\(|min\s*\(|abs\s*\(|log(?:2|10)?\s*\(|ln\s*\(|sqrt\s*\(|pow\s*\(|" + - @"factorial\s*\(|sign\s*\(|round\s*\(|rand\s*\(|" + + @"factorial\s*\(|sign\s*\(|round\s*\(|rand\s*\(\)|randi\s*\([^\)]|" + @"sin\s*\(|cos\s*\(|tan\s*\(|arcsin\s*\(|arccos\s*\(|arctan\s*\(|" + @"sinh\s*\(|cosh\s*\(|tanh\s*\(|arsinh\s*\(|arcosh\s*\(|artanh\s*\(|" + @"pi|" +