diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6c8953..6799cf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,7 +119,7 @@ jobs: - name: Build and Test run: | export TEST_DIR=$RUNNER_TEMP - cargo test-all-features --release --verbose + cargo +nightly test-all-features --release --verbose - name: Lint run: | - cargo check-all-features --all-targets + cargo +nightly check-all-features --all-targets diff --git a/Cargo.toml b/Cargo.toml index 6d71837..fbca319 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,9 @@ rand = { version = "0.8" } [target.'cfg(unix)'.dependencies] nix = { version = "0.28", features = ["fs", "user"] } +[dev-dependencies] +tempfile = { version = "3.10.1" } + [features] default = ["unnamed-tmpfile"] diff --git a/src/tests.rs b/src/tests.rs index 350820d..8e454f5 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -221,3 +221,11 @@ fn creates_named_temporary_files() -> Result<()> { verify_temporary_file_name("foo", temp_file_name); file.commit() } + +#[test] +fn named_temp_file() -> Result<()> { + let file = tempfile::NamedTempFile::new()?; + let path = file.path(); + let atomic = AtomicWriteFile::open(path)?; + atomic.commit() +}