@@ -20,38 +20,59 @@ scanning and message errors.
2020To run all tests in e.g., for the compiler test-suite you can write:
2121
2222``` bash
23+ $ sbt
2324> dotty-compiler/test
2425```
2526
2627To run a single test class you use ` testOnly ` and the fully qualified class name.
2728For example:
2829
2930``` bash
30- > dotty-compiler/ testOnly dotty.tools.dotc.transform.TreeTransformerTest
31+ > testOnly dotty.tools.dotc.transform.TreeTransformerTest
3132```
3233
33- You can further restrict the executed tests to a subset of methods by appending `` -- *method_name ``
34- as in the example below:
34+ The test command follows a regular expression-based syntax ` testOnly * -- * ` .
35+ The right-hand side picks a range of names for methods and the left-hand side picks a range of class names and their
36+ fully-qualified paths.
37+
38+ Consequently, you can restrict the aforementioned executed test to a subset of methods by appending `` -- *method_name `` .
39+ The example below picks up all methods with the name ` canOverwrite ` :
40+
41+ ``` bash
42+ > testOnly dotty.tools.dotc.transform.TreeTransformerTest -- * canOverwrite
43+ ```
44+
45+ Additionally, you can run all tests named ` method_name ` , in any class, without providing a class name:
3546
3647``` bash
37- > dotty-compiler/testOnly dotty.tools.dotc.transform.TreeTransformerTest -- * canOverwrite
48+ > testOnly -- * canOverwrite
49+ ```
50+
51+ You can also run all paths of classes of a certain name:
52+
53+ ``` bash
54+ > testOnly * .TreeTransformerTest
3855```
3956
4057## Integration tests
4158These tests are Scala source files expected to compile with Dotty (pos tests),
4259along with their expected output (run tests) or errors (neg tests).
4360
44- All of these tests are contained in the ` ./tests/* ` directories.
61+ All of these tests are contained in the ` ./tests/* ` directories and can be run with the ` vulpix ` command .
4562
4663Currently to run these tests you need to invoke from sbt:
4764
4865``` bash
49- > testOnly dotty.tools.dotc.CompilationTests
66+ $ sbt
67+ > vulpix
5068```
5169
52- It is also possible to run tests filtered by using the ` vulpix ` command, again from sbt:
70+ (which is effectively the same with ` testOnly dotty.tools.dotc.CompilationTests ` )
71+
72+ It is also possible to run tests filtered, again from sbt:
5373
5474``` bash
75+ $ sbt
5576> vulpix i2147.scala
5677```
5778
0 commit comments