mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
Unify magic env var name
This commit is contained in:
parent
7b0113b3d5
commit
991850bc3c
2 changed files with 3 additions and 3 deletions
|
@ -274,7 +274,7 @@ fn assert_equal_text(expected: &str, actual: &str, path: &Path) {
|
|||
fs::write(path, actual).unwrap();
|
||||
return;
|
||||
}
|
||||
if env::var("UPDATE_EXPECTATIONS").is_ok() {
|
||||
if env::var("UPDATE_EXPECT").is_ok() {
|
||||
println!("rewriting {}", pretty_path.display());
|
||||
fs::write(path, actual).unwrap();
|
||||
return;
|
||||
|
|
|
@ -361,10 +361,10 @@ There are two kinds of tests:
|
|||
The purpose of inline tests is not to achieve full coverage by test cases, but to explain to the reader of the code what each particular `if` and `match` is responsible for.
|
||||
If you are tempted to add a large inline test, it might be a good idea to leave only the simplest example in place, and move the test to a manual `parser/ok` test.
|
||||
|
||||
To update test data, run with `UPDATE_EXPECTATIONS` variable:
|
||||
To update test data, run with `UPDATE_EXPECT` variable:
|
||||
|
||||
```bash
|
||||
env UPDATE_EXPECTATIONS=1 cargo qt
|
||||
env UPDATE_EXPECT=1 cargo qt
|
||||
```
|
||||
|
||||
After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above.
|
||||
|
|
Loading…
Reference in a new issue