This commit is contained in:
parent
ca38325311
commit
c1bbf5b135
1 changed files with 6 additions and 6 deletions
|
|
@ -724,7 +724,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn not_found_fallback_error() {
|
||||
fn not_found_asset_error() {
|
||||
let error = fallback("not_found.png", &Graph::default()).unwrap_err();
|
||||
|
||||
assert!(matches!(&error.kind, AssetErrorKind::NotFound));
|
||||
|
|
@ -735,10 +735,10 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, unix))]
|
||||
#[expect(clippy::panic_in_result_fn)]
|
||||
mod serial_tests {
|
||||
use std::{fs, os::unix::fs::PermissionsExt};
|
||||
use std::{fs, os::unix::fs::PermissionsExt as _};
|
||||
|
||||
use super::*;
|
||||
use crate::dev::test::{Directories, Error};
|
||||
|
|
@ -755,9 +755,6 @@ mod serial_tests {
|
|||
permissions.set_mode(0o200);
|
||||
fs::set_permissions(&file, permissions)?;
|
||||
|
||||
let permissions = fs::metadata(&file)?.permissions();
|
||||
assert_eq!(0o200, permissions.mode());
|
||||
|
||||
let error = fallback("unreadable.png", &Graph::default()).unwrap_err();
|
||||
|
||||
assert!(matches!(&error.kind, AssetErrorKind::IO));
|
||||
|
|
@ -766,6 +763,9 @@ mod serial_tests {
|
|||
.contains("was found, but it could not be loaded")
|
||||
);
|
||||
|
||||
let new_permissions = fs::metadata(&file)?.permissions();
|
||||
assert_eq!(new_permissions.mode() & 0o777, 0o200);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue