aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-01 11:31:03 +0100
committerAleksey Kladov <[email protected]>2020-07-01 11:31:03 +0100
commit991850bc3c2ff34fe8b3e63815067307d8d90db6 (patch)
tree78b54055f2f5394ce4b75bbaf6f97bad466710ae
parent7b0113b3d588fdc1f95eca1286fb2f6881abe65a (diff)
Unify magic env var name
-rw-r--r--crates/ra_syntax/src/tests.rs2
-rw-r--r--docs/dev/README.md4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/tests.rs b/crates/ra_syntax/src/tests.rs
index f14f23628..7b4232497 100644
--- a/crates/ra_syntax/src/tests.rs
+++ b/crates/ra_syntax/src/tests.rs
@@ -274,7 +274,7 @@ fn assert_equal_text(expected: &str, actual: &str, path: &Path) {
274 fs::write(path, actual).unwrap(); 274 fs::write(path, actual).unwrap();
275 return; 275 return;
276 } 276 }
277 if env::var("UPDATE_EXPECTATIONS").is_ok() { 277 if env::var("UPDATE_EXPECT").is_ok() {
278 println!("rewriting {}", pretty_path.display()); 278 println!("rewriting {}", pretty_path.display());
279 fs::write(path, actual).unwrap(); 279 fs::write(path, actual).unwrap();
280 return; 280 return;
diff --git a/docs/dev/README.md b/docs/dev/README.md
index f1139d2f4..f87462400 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -361,10 +361,10 @@ There are two kinds of tests:
361The 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. 361The 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.
362If 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. 362If 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.
363 363
364To update test data, run with `UPDATE_EXPECTATIONS` variable: 364To update test data, run with `UPDATE_EXPECT` variable:
365 365
366```bash 366```bash
367env UPDATE_EXPECTATIONS=1 cargo qt 367env UPDATE_EXPECT=1 cargo qt
368``` 368```
369 369
370After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above. 370After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above.