Skip to content

Commit b1c4662

Browse files
committed
changed to relative links, where possible
1 parent 572eaa6 commit b1c4662

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: src/compiletest.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,27 @@ configure behavior and expected results of both individual and groups of tests.
77
`compiletest` tests may check test code for success, for failure or in some cases, even failure to compile. Tests are
88
typically organized as a Rust source file with annotations in comments before and/or within the test code, which serve to
99
direct `compiletest` on if or how to run the test, what behavior to expect, and more. If you are unfamiliar with the compiler
10-
testing framework, see [`this chapter`](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/intro.md) for additional background.
10+
testing framework, see [`this chapter`](./tests/intro.html) for additional background.
1111

1212
The tests themselves are typically (but not always) organized into "suites"--for example, `run-pass`, a folder
1313
representing tests that should succeed, `run-fail`, a folder holding tests that should compile successfully, but return
1414
a failure (non-zero status), `compile-fail`, a folder holding tests that should fail to compile, and many more. The various
1515
suites are defined in [src/tools/compiletest/src/common.rs](https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/common.rs) in the `pub struct Config` declaration. And a very good
16-
introduction to the different suites of compiler tests along with details about them can be found
17-
in [`Adding new tests`](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/adding.md).
16+
introduction to the different suites of compiler tests along with details about them can be found in [`Adding new tests`](./tests/adding.html).
1817

1918
## Adding a new test file
2019
Briefly, simply create your new test in the appropriate location under [src/test](https://github.com/rust-lang/rust/tree/master/src/test). No registration of test files is necessary as
2120
`compiletest` will scan the [src/test](https://github.com/rust-lang/rust/tree/master/src/test) subfolder recursively, and will execute any Rust source files it finds as tests.
22-
See [`Adding new tests`](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/adding.md) for a complete guide on how to adding new tests.
21+
See [`Adding new tests`](./tests/adding.html) for a complete guide on how to adding new tests.
2322

2423
## Header Commands
2524
Source file annotations which appear in comments near the top of the source file *before* any test code are known as header
2625
commands. These commands can instruct `compiletest` to ignore this test, set expectations on whether it is expected to
2726
succeed at compiling, or what the test's return code is expected to be. Header commands (and their inline counterparts,
28-
Error Info commands) are described more fully [here](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/adding.md#header-commands-configuring-rustc).
27+
Error Info commands) are described more fully [here](./tests/adding.html#header-commands-configuring-rustc).
2928

3029
### Adding a new header command
31-
Header commands are defined in the `TestProps` struct in [src/tools/compiletest/src/header.rs](https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/header.rs). At a high level, there are dozens of test properties are defined here, all set to default values in the `TestProp` struct's `impl` block. Any test can override this
30+
Header commands are defined in the `TestProps` struct in [src/tools/compiletest/src/header.rs](https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/header.rs). At a high level, there are dozens of test properties defined here, all set to default values in the `TestProp` struct's `impl` block. Any test can override this
3231
default value by specifying the property in question as header command as a comment (`//`) in the test source file, before any source code.
3332

3433
#### Using a header command

0 commit comments

Comments
 (0)