()
| 245 | |
| 246 | #[test] |
| 247 | fn test_find_uki_path_sorted() -> Result<()> { |
| 248 | let tempdir = cap_tempfile::tempdir(cap_std::ambient_authority())?; |
| 249 | tempdir.create_dir_all("boot/EFI/Linux")?; |
| 250 | tempdir.atomic_write("boot/EFI/Linux/zzz.efi", &create_minimal_pe())?; |
| 251 | tempdir.atomic_write("boot/EFI/Linux/aaa.efi", &create_minimal_pe())?; |
| 252 | tempdir.atomic_write("boot/EFI/Linux/mmm.efi", &create_minimal_pe())?; |
| 253 | |
| 254 | // Should return first in sorted order |
| 255 | let path = find_uki_path(&tempdir)?.expect("should find uki"); |
| 256 | assert_eq!(path.as_str(), "boot/EFI/Linux/aaa.efi"); |
| 257 | Ok(()) |
| 258 | } |
| 259 | } |
nothing calls this directly
no test coverage detected