Skip to content

Commit 329970c

Browse files
Update inc-example-test.md (#73)
* Update inc-example-test.md * Update inc-example-test.md
1 parent e336ac2 commit 329970c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

docs/inc-example-test.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@
99
make run-tests-local
1010
```
1111

12-
- To run a specific test or tests, use the `RUN` variable to pass a regular expression that matches the names of the tests that you want to run:
13-
14-
```bash
15-
make run-tests-local RUN=TestRunDefaultExample
16-
```
12+
- To run a specific test or tests, use the `RUN` variable to pass a regular expression that matches the names of the tests that you want to run. If you want to match a test name exactly, enclose it with ^ at the start and $ at the end.
13+
14+
Example 1: This will match any test with "TestRunDefaultExample" in its name, so it may also run tests like "TestRunDefaultExampleWithFlavor".
15+
```bash
16+
make run-tests-local RUN=TestRunDefaultExample
17+
```
18+
19+
Example 2: This will only run "TestRunDefaultExample" and exclude any similarly named tests.
20+
```bash
21+
make run-tests-local RUN="^TestRunDefaultExample$"
22+
```
1723

1824
If the tests run successfully, you see a `PASS` statement. If you see an error, see [How do I address errors when I run tests?](ts-go-cache.md).
1925

0 commit comments

Comments
 (0)