Merge pull request #10460 from dotCooCoo/fix/test-lint-mirror-false-alarms

xtask: test-lint mirror leaves out entry reads, never-run follows #[path] modules
This commit is contained in:
.CooCoo authored and GitHub committed 2026-12-01 20:19:50 -08:00
commit 22bc29d69d
13 files changed
+2234 -442

No files matched your search

+2
View File
@@ -629,6 +629,7 @@ mod tests {
/// On Windows `busy_cores` gives a number between 0 and the cores.
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn windows_reads_how_many_cores_are_busy() {
let cores = std::thread::available_parallelism().map_or(1, |c| c.get());
@@ -639,6 +640,7 @@ mod tests {
/// On Windows `rss_mb` gives this process's working set: more than 0 MB and less than
/// 10,000 MB.
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn windows_reads_the_working_set() {
let mb = rss_mb().map(|(mb, _)| mb);
+3
View File
@@ -99,6 +99,7 @@ mod tests {
}
/// A layer without a color space is tagged sRGB once; the second call leaves it as it is.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn an_untagged_layer_becomes_srgb() {
let layer = CAMetalLayer::new();
@@ -110,6 +111,7 @@ mod tests {
}
/// A layer with a color space of its own keeps it.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn a_layer_with_a_color_space_keeps_it() {
let layer = CAMetalLayer::new();
@@ -121,6 +123,7 @@ mod tests {
/// The Metal layer is found as the view's layer or as one of its sublayers, and only Metal
/// layers are returned.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn metal_layers_are_found_under_the_view_layer() {
let metal = CAMetalLayer::new();
+2
View File
@@ -52,6 +52,7 @@ mod tests {
use objc2_core_text::{CTFontManagerRegisterFontsForURL, CTFontManagerScope, CTFontManagerUnregisterFontsForURL};
/// CoreText lists the installed fonts, by their files' full paths.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn coretext_lists_the_installed_font_files() {
let files = super::font_files();
@@ -61,6 +62,7 @@ mod tests {
/// A font registered with CoreText from another folder, as apps and font managers register
/// fonts, is listed while it is registered.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn fonts_registered_from_other_folders_are_listed() {
let dir = tempfile::Builder::new().prefix("vectorcraft-mac-fonts-").tempdir().unwrap();
+1
View File
@@ -94,6 +94,7 @@ mod tests {
use super::*;
/// Files queue until the UI takes them; URLs that aren't files are left out.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn opened_files_wait_for_the_ui() {
let web = NSURL::URLWithString(&NSString::from_str("https://example.com/a.svg")).unwrap();
+2
View File
@@ -1390,6 +1390,7 @@ mod tests {
}
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn windows_ignores_case_and_refuses_devices() {
let (base, roots) = folders("case");
@@ -1471,6 +1472,7 @@ mod tests {
}
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn windows_refuses_a_stream_inside_a_write_root() {
let (base, roots) = folders("streams");
+1
View File
@@ -417,6 +417,7 @@ fn a_search_skips_font_files_too_large_to_add() {
/// A suitcase font: a file without an extension or with `.suit`, empty but for the fonts in its
/// resource fork, which only macOS keeps. A search finds it, and Add Fonts copies it with its fork.
#[cfg(target_os = "macos")]
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn suitcase_fonts_are_found_and_copied_with_their_fork() {
use vectorcraft_testkit::fonts::{renamed, suitcase_fork};
+3
View File
@@ -189,6 +189,7 @@ fn a_path_on_a_mapped_drive_is_on_the_share_behind_it() {
}
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn links_on_a_mapped_drives_share_are_followed() {
use crate::cmd::fileio::{document_path_with, share_of};
@@ -208,6 +209,7 @@ fn links_on_a_mapped_drives_share_are_followed() {
}
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn links_on_a_drive_mapped_to_another_share_are_not_followed() {
use crate::cmd::fileio::{document_path_on, drive_share_of, share_of};
@@ -228,6 +230,7 @@ fn links_on_a_drive_mapped_to_another_share_are_not_followed() {
}
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn links_on_the_documents_share_or_this_computer_are_followed() {
use crate::cmd::fileio::{document_path_on, drive_share_of, share_of};
+1
View File
@@ -4110,6 +4110,7 @@ fn a_removal_deletes_only_folders_it_marked() {
/// Windows keeps a file another program holds open without delete sharing, so the last grant can't
/// be removed by deleting `grants.json`.
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn a_grants_file_that_cannot_be_deleted_keeps_the_stored_module() {
use std::os::windows::fs::OpenOptionsExt;
+3
View File
@@ -1020,6 +1020,7 @@ fn script_file_alias_is_not_left_behind_a_folder_replaced_by_a_link() {
/// Where a hidden file is not one whose name starts with a dot, setting `hidden` and `createAlias`
/// set `error` and change nothing.
#[cfg(not(unix))]
// test-lint: allow never-run Windows only (not Unix); CI runs tests on Linux and FreeBSD
#[test]
fn script_file_hidden_and_aliases_are_refused_off_unix() {
let base = folder("hiddenoff");
@@ -1637,6 +1638,7 @@ fn script_file_rename_does_not_take_the_settings_folders_name() {
/// Where case does not matter, a folder named in another case is still the folder that holds the
/// settings folder, or the settings folder itself: it is not renamed or removed.
#[cfg(any(windows, target_os = "macos"))]
// test-lint: allow never-run needs a case-insensitive file system (Windows, macOS); CI runs tests on Linux and FreeBSD
#[test]
fn script_file_rename_does_not_move_the_settings_folder_named_in_another_case() {
let base = folder("moveupcase");
@@ -1660,6 +1662,7 @@ fn script_file_rename_does_not_move_the_settings_folder_named_in_another_case()
/// Where case does not matter, a folder renamed under its name in another case still moves the open
/// objects of the files in it: changes are written under the new name, not lost at the old one.
#[cfg(any(windows, target_os = "macos"))]
// test-lint: allow never-run needs a case-insensitive file system (Windows, macOS); CI runs tests on Linux and FreeBSD
#[test]
fn script_file_rename_of_a_folder_named_in_another_case_moves_its_open_files() {
let base = folder("renamecase");
+1
View File
@@ -79,6 +79,7 @@ fn file_names(dir: &std::path::Path) -> Vec<String> {
/// Windows does not allow replacing a read-only file or writing into it, so the write fails.
#[cfg(windows)]
// test-lint: allow never-run Windows only; CI runs tests on Linux and FreeBSD
#[test]
fn a_rename_that_only_changes_case_and_cannot_be_written_keeps_the_old_file() {
let root = fresh_dir("rename-case-fails");
+3
View File
@@ -159,6 +159,7 @@ mod quartz {
}
/// Quartz places RGB and CMYK radial centres, edges and masks with their translated art.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn quartz_keeps_off_centre_radials_in_transparency_and_layer_forms() {
for mode in [ColorMode::Rgb, ColorMode::Cmyk] {
@@ -179,6 +180,7 @@ mod quartz {
}
/// Quartz retains the linear ramp's direction inside forms on a translated artboard.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn quartz_keeps_linear_gradient_directions_in_forms() {
for form in FORMS.into_iter().filter(|f| !matches!(f, Form::Mask | Form::Knockout)) {
@@ -190,6 +192,7 @@ mod quartz {
}
/// A gradient's stop-opacity mask remains aligned with its colour through nested forms.
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn quartz_keeps_gradient_stop_opacity_aligned_inside_nested_forms() {
let (mut d, opts) = fixture(Form::Nested, GradientKind::Radial, ColorMode::Rgb, Point::ORIGIN);
+3
View File
@@ -812,6 +812,7 @@ fn a_resource_fork_gives_up_its_font_files() {
/// Office's fonts: a file with nothing in it but a resource fork holding the fonts, named
/// without an extension. Only macOS keeps a resource fork in a file.
#[cfg(target_os = "macos")]
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn the_scan_reads_suitcase_fonts() {
let dir = font_dir("suitcase");
@@ -1018,6 +1019,7 @@ fn a_search_reads_at_most_its_share_of_a_font_file() {
/// A search reads a suitcase font only when its whole resource fork fits in the 8 MB a search reads
/// of one file.
#[cfg(target_os = "macos")]
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn a_search_reads_a_suitcase_font_only_within_its_share() {
use crate::fontdb::file_face_names_within;
@@ -1043,6 +1045,7 @@ fn a_search_reads_a_suitcase_font_only_within_its_share() {
/// A suitcase font read for one search (Retype) is read no further than one byte past the limit,
/// and the bytes read are counted.
#[cfg(target_os = "macos")]
// test-lint: allow never-run macOS only; CI runs tests on Linux and FreeBSD
#[test]
fn a_suitcase_font_read_for_a_search_counts_the_bytes_of_its_fork() {
let dir = std::env::temp_dir().join(format!("vc-sysfonts-{}-unloaded-suitcase", std::process::id()));
+2209 -442
View File
File diff suppressed because it is too large. Load diff