From 580c171c288d2b7f85f02129c690afa04ca4c51c Mon Sep 17 00:00:00 2001 From: Eduardo Rodrigues <16357187+eduardomourar@users.noreply.github.com> Date: Wed, 14 Oct 2026 00:11:20 +0100 Subject: [PATCH] tests(dircolors): enable wasi integration tests --- .github/workflows/wasi.yml | 4 ++-- tests/by-util/test_dircolors.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wasi.yml b/.github/workflows/wasi.yml index 15533a206a2..f9980e56d63 100644 --- a/.github/workflows/wasi.yml +++ b/.github/workflows/wasi.yml @@ -65,7 +65,7 @@ jobs: # caret diagnostics; the host test crate does have them, hence the # not(wasi_runner) in the cfg guarding every `mod diagnostics`. # TODO: add integration tests for these tools as WASI support is extended: - # csplit dircolors fmt ls mv readlink + # csplit fmt ls mv readlink # rm seq sort split tsort # nproc is not part of the default feature set, so it needs to be # requested explicitly for the host test crate to compile its tests. @@ -74,7 +74,7 @@ jobs: cargo test --test tests --features nproc -- \ test_arch:: test_b2sum:: test_base32:: test_base64:: test_basenc:: \ test_basename:: test_cat:: test_cksum:: test_comm:: test_cp:: test_cut:: test_date:: \ - test_dir:: test_dirname:: test_echo:: test_expand:: test_expr:: \ + test_dir:: test_dircolors:: test_dirname:: test_echo:: test_expand:: test_expr:: \ test_factor:: test_false:: test_fold:: test_head:: test_join:: test_link:: test_ln:: \ test_ls::test_ls_a_dotdot_no_error_on_wasi \ test_ls::test_ls_al_no_capabilities_insufficient_on_wasi \ diff --git a/tests/by-util/test_dircolors.rs b/tests/by-util/test_dircolors.rs index 3760124f286..ce74da38695 100644 --- a/tests/by-util/test_dircolors.rs +++ b/tests/by-util/test_dircolors.rs @@ -11,6 +11,7 @@ use uutests::new_ucmd; #[test] #[cfg(target_os = "linux")] +#[cfg_attr(wasi_runner, ignore = "WASI: argv/filenames must be valid UTF-8")] fn test_dircolors_non_utf8_paths() { use std::os::unix::ffi::OsStringExt; let (at, mut ucmd) = at_and_ucmd!();