Skip to content

Commit 13645f0

Browse files
committed
Update user-guide
Issue: #3717 Signed-off-by: yongjunhong <[email protected]>
1 parent 6c5d6c3 commit 13645f0

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

documentation/src/docs/asciidoc/user-guide/extensions.adoc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,20 @@ Specifically, a custom extension can be registered by supplying its fully qualif
289289
name in a file named `org.junit.jupiter.api.extension.Extension` within the
290290
`/META-INF/services` folder in its enclosing JAR file.
291291

292+
[[automatic-extension-registration-pattern-matching]]
293+
===== Pattern Matching Syntax
294+
295+
Pattern matching syntax is used to automatically detect and register extensions. Here are some examples of pattern matching syntax:
296+
297+
- `*`: includes all extensions.
298+
- `org.junit.*`: includes every extension under the `org.junit` base package and any of its subpackages.
299+
- `*.MyExtension`: includes every extension whose simple class name is exactly `MyExtension`.
300+
- `*System*`: includes every extension whose FQCN contains `System`.
301+
- `*System*, *Dev*`: includes every extension whose FQCN contains `System` or `Dev`.
302+
- `org.example.MyExtension, org.example.TheirExtension`: includes extensions whose FQCN is exactly `org.example.MyExtension` or `org.example.TheirExtension`.
303+
304+
> **Note**: A class that matches both an inclusion and exclusion pattern will be excluded.
305+
292306
[[extensions-registration-automatic-enabling]]
293307
===== Enabling Automatic Extension Detection
294308

@@ -368,7 +382,7 @@ following system property.
368382
[[extensions-conditions-deactivation-patterns]]
369383
===== Pattern Matching Syntax
370384

371-
Refer to <<running-tests-config-params-deactivation-pattern>> for details.
385+
Pattern matching syntax is used to automatically detect and register extensions. For more details, refer to the <<automatic-extension-registration-pattern-matching,Pattern Matching Syntax>> section.
372386

373387
[[extensions-test-instance-pre-construct-callback]]
374388
=== Test Instance Pre-construct Callback

0 commit comments

Comments
 (0)