From 6d7731659ae0a38578a571f39ebd1ddba532b889 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 13 May 2024 09:56:27 +0200 Subject: [PATCH] Fix WildcardPatternException when using dt (#2443) Tests with pattern characters in name would fail. --- tst/p.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tst/p.psm1 b/tst/p.psm1 index 2d4af132b..96014cbd4 100644 --- a/tst/p.psm1 +++ b/tst/p.psm1 @@ -104,7 +104,7 @@ function t { ) if (-not $script:discovery) { - if (-not $script:filter -or $script:filter -like "*$name") { + if (-not $script:filter -or $script:filter -like "*$([System.Management.Automation.WildcardPattern]::Escape($name))") { try { $script:total++ $null = & $ScriptBlock