Skip to content

Commit 1618d2f

Browse files
committed
fix(test): add env var cleanup in backup_control test
Add unsafe env::remove_var(ENV_VERSION_CONTROL) after assertion in test to prevent test pollution and ensure environment isolation.
1 parent f29fbde commit 1618d2f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/uucore/src/lib/features/backup_control.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ mod tests {
683683
let result = determine_backup_mode(&matches).unwrap();
684684

685685
assert_eq!(result, BackupMode::Numbered);
686+
unsafe { env::remove_var(ENV_VERSION_CONTROL) };
686687
}
687688

688689
#[test]

0 commit comments

Comments
 (0)