summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@sequoia-pgp.org>2024-03-07 23:25:32 +0100
committerNeal H. Walfield <neal@sequoia-pgp.org>2024-03-07 23:43:35 +0100
commitc8c3e7ab5cdc3cfa5d4e82430680ec95b2edaaf2 (patch)
treef33b4c9bff5fbd779b56550dc68c176c5ceb0cd6
parent02bf980e2283b64a51ba2e290bf58fda54bbd4a7 (diff)
Add a test to check that a context's home directory really exists.
-rw-r--r--ipc/src/gnupg.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/ipc/src/gnupg.rs b/ipc/src/gnupg.rs
index 3a84c93b..c7442769 100644
--- a/ipc/src/gnupg.rs
+++ b/ipc/src/gnupg.rs
@@ -883,4 +883,12 @@ mod tests {
let rt = tokio::runtime::Runtime::new()?;
rt.block_on(async_context())
}
+
+ #[test]
+ fn homedir() {
+ let ctx = Context::ephemeral()
+ .expect("can create an ephemeral context");
+ let homedir = ctx.homedir().expect("have homedir");
+ assert!(homedir.exists(), "{} should exist", homedir.display());
+ }
}