aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/installer_test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/tests/installer_test.rs')
-rw-r--r--crates/shirabe/tests/installer_test.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/shirabe/tests/installer_test.rs b/crates/shirabe/tests/installer_test.rs
index c7d3a91..5e0f941 100644
--- a/crates/shirabe/tests/installer_test.rs
+++ b/crates/shirabe/tests/installer_test.rs
@@ -3,11 +3,30 @@
// These are large end-to-end installer integration cases driven by fixtures and a mocked
// Composer/IO/repositories; the full install pipeline (and constraint parsing through a
// look-around regex) is not ported.
+
+use shirabe::util::platform::Platform;
+
+// The chdir back to prevCwd (cwd management) and removeDirectory of tempComposerHome (a
+// path produced by the unported install pipeline) are not ported; only the env clears are.
+fn tear_down() {
+ Platform::clear_env("COMPOSER_POOL_OPTIMIZER");
+ Platform::clear_env("COMPOSER_FUND");
+}
+
+struct TearDown;
+
+impl Drop for TearDown {
+ fn drop(&mut self) {
+ tear_down();
+ }
+}
+
macro_rules! stub {
($name:ident) => {
#[test]
#[ignore = "not yet ported (end-to-end Installer integration over fixtures; constraint parsing uses a look-around regex)"]
fn $name() {
+ let _tear_down = TearDown;
todo!()
}
};