1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Shared test plumbing for the plugin module. All plugin tests that
//! mutate `ATOMCODE_HOME` use [`isolated_home`] to obtain an [`IsolatedHome`]
//! guard whose `Drop` removes the env var, preventing cross-test leakage when
//! tempdirs clean up out of order.
//!
//! Tests that share this guard MUST also be marked
//! `#[serial_test::serial]` (default unnamed lock) so they serialize against
//! each other across modules.
use ;
/// Create a fresh tempdir, point `ATOMCODE_HOME` at it, and return a guard
/// that cleans up both the env var and the dir on drop. Caller must keep the
/// returned value alive for the duration of the test.