From 84ce79aea3bb0cdbb29b7d5f77a272e97ed28295 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Wed, 28 Jan 2026 00:59:33 +0000 Subject: [PATCH] docs: fix incorrect OR operator syntax in test-filters documentation The previous example `(/*/*/Class1/*)|(/*/*/Class2/*)` is invalid because Microsoft.Testing.Platform's TreeNodeFilter does not allow OR operations across full paths - the `/` character cannot appear within expressions being combined with operators. The correct syntax uses OR within a single path segment: `/*/*/(Class1)|(Class2)/*` Fixes #4580 --- docs/docs/execution/test-filters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/execution/test-filters.md b/docs/docs/execution/test-filters.md index 03feebddb9..4b527923c8 100644 --- a/docs/docs/execution/test-filters.md +++ b/docs/docs/execution/test-filters.md @@ -23,7 +23,7 @@ TUnit supports several operators for building complex filters: - **Equality:** Use `=` for exact match (e.g., `[Category=Unit]`) - **Negation:** Use `!=` for excluding values (e.g., `[Category!=Performance]`) - **AND operator:** Use `&` to combine conditions (e.g., `[Category=Unit]&[Priority=High]`) -- **OR operator:** Use `|` to match either condition - requires parentheses (e.g., `(/*/*/Class1/*)|(/*/*/Class2/*)`) +- **OR operator:** Use `|` to match either condition within a single path segment - requires parentheses (e.g., `/*/*/(Class1)|(Class2)/*`) For full information on the treenode filters, see [Microsoft's documentation](https://github.com/microsoft/testfx/blob/main/docs/mstest-runner-graphqueryfiltering/graph-query-filtering.md)