Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test.md #2679

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions website/docs/commands/test.md
Expand Up @@ -10,23 +10,22 @@ Test sources are compiled separately (after the 'main' sources), and may use dif
and other configurations.

By default, all command line options apply to both the main and test sources,
so [using directives](../guides/introduction/using-directives.md) (
or [special imports](../guides/introduction/configuration#special-imports)) can be used to provide test-specific configurations.
so [using directives](../guides/introduction/using-directives.md) can be used to provide test-specific configurations.

## Test sources

A source file is treated as test source if:

- the file name ends with `.test.scala`, or
- the file comes from a directory that is provided as input, and the relative path from that file to its original
directory contains a `test` directory
- it contains the `//> using target.scope test` directive, or
directory contains a `test` directory, or
- it contains the `//> using target.scope test` directive

:::caution
The `using target` directives are an experimental feature, and may change in future versions of Scala CLI.
:::

The last rule may sound a bit complicated, so let's explain it using following directory structure:
The second rule may sound a bit complicated, so let's explain it using following directory structure:

<ChainedSnippets>

Expand Down