diff options
author | Justus Winter <justus@pep-project.org> | 2018-01-03 13:56:56 +0100 |
---|---|---|
committer | Justus Winter <justus@pep-project.org> | 2018-01-03 14:39:35 +0100 |
commit | b2ca6ef94c275038efbdf75c15cb48c9383b65d9 (patch) | |
tree | 76f038b965b3a52c9211054cb41cfb2962ba435d /core | |
parent | 3f977ce993cd4dc6afb5221c70069532eb12d7bd (diff) |
core: Do not create files in tests.
- Do not create files in $HOME/.sequoia in the doc tests by using
ephemeral home directories and not running the example with the
simple constructor.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/lib.rs b/core/src/lib.rs index bfd3cf9d..aa9f0232 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -15,7 +15,7 @@ use tempdir::TempDir; /// A context with reasonable defaults can be created using /// `Context::new`: /// -/// ``` +/// ```no_run /// # use sequoia_core::{Context, Result}; /// # f().unwrap(); /// # fn f() -> Result<()> { @@ -32,6 +32,7 @@ use tempdir::TempDir; /// # f().unwrap(); /// # fn f() -> Result<()> { /// let c = Context::configure("org.example.webmail") +/// # .ephemeral() /// .network_policy(NetworkPolicy::Offline) /// .build()?; /// # Ok(()) @@ -119,6 +120,7 @@ impl Context { /// # f().unwrap(); /// # fn f() -> Result<()> { /// let c = Context::configure("org.example.webmail") +/// # .ephemeral() /// .network_policy(NetworkPolicy::Offline) /// .build()?; /// # Ok(()) |