xtask: run the non-UTF-8 changed-file test off macOS only (#1224)

APFS refuses file names that aren't UTF-8 (EILSEQ, "Illegal byte sequence"), so the test's
fixture write panicked on the macOS gate before reaching changed_files. Such a file can't
exist on macOS; Linux keeps running the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
arnav-hiwarkarandClaude Opus 5.5 committed 2026-11-10 20:48:05 +05:30
1 parent b23bbf927f
commit c330262ef2
1 file changed
+3 -1
+3 -1
View File
@@ -601,7 +601,9 @@ let out = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../target/test-out");
assert_eq!(changed_files(root, "HEAD").unwrap(), files(&[tracked, untracked]));
}
#[cfg(unix)]
// macOS (APFS) refuses file names that aren't UTF-8 ("Illegal byte sequence"), so there the
// fixture can't be made and such a change can't happen.
#[cfg(all(unix, not(target_os = "macos")))]
#[test]
fn changed_files_reject_non_utf8_instead_of_silently_omitting_it() {
use std::os::unix::ffi::OsStringExt;