@@ -386,6 +386,10 @@ fn test_date_utc_with_d_flag() {
386386}
387387
388388#[ test]
389+ #[ cfg_attr(
390+ wasi_runner,
391+ ignore = "WASI sandbox: timezone/locale database not visible"
392+ ) ]
389393fn test_date_utc_vs_local ( ) {
390394 let cases = [
391395 ( "-d" , "2024-01-01 12:00" , "+%H:%M %Z" , "12:00 EST\n " ) ,
@@ -532,6 +536,10 @@ fn test_date_set_invalid() {
532536
533537#[ test]
534538#[ cfg( all( unix, not( any( target_vendor = "apple" , target_os = "android" ) ) ) ) ]
539+ #[ cfg_attr(
540+ wasi_runner,
541+ ignore = "WASI: setting the system clock is not supported at all, not just permission-gated"
542+ ) ]
535543fn test_date_set_permissions_error ( ) {
536544 if !( geteuid ( ) . is_root ( ) || uucore:: os:: is_wsl_1 ( ) ) {
537545 let result = new_ucmd ! ( )
@@ -545,6 +553,10 @@ fn test_date_set_permissions_error() {
545553
546554#[ test]
547555#[ cfg( all( unix, not( any( target_vendor = "apple" , target_os = "android" ) ) ) ) ]
556+ #[ cfg_attr(
557+ wasi_runner,
558+ ignore = "WASI: setting the system clock is not supported at all, not just permission-gated"
559+ ) ]
548560fn test_date_set_hyphen_prefixed_values ( ) {
549561 // test -s flag accepts hyphen-prefixed values like "-3 days"
550562 if !( geteuid ( ) . is_root ( ) || uucore:: os:: is_wsl_1 ( ) ) {
@@ -565,6 +577,10 @@ fn test_date_set_hyphen_prefixed_values() {
565577
566578#[ test]
567579#[ cfg( target_vendor = "apple" ) ]
580+ #[ cfg_attr(
581+ wasi_runner,
582+ ignore = "test binary runs on macOS but the wasm guest under test does not, so the expected macOS-specific error text never appears"
583+ ) ]
568584fn test_date_set_mac_unavailable ( ) {
569585 let result = new_ucmd ! ( )
570586 . arg ( "--set" )
@@ -905,7 +921,7 @@ fn test_date_parse_from_format() {
905921 2023-04-15 18:30:00",
906922 ) ;
907923 ucmd. arg ( "-f" )
908- . arg ( at . plus ( FILE ) )
924+ . arg ( FILE )
909925 . arg ( "+%Y-%m-%d %H:%M:%S" )
910926 . succeeds ( ) ;
911927}
@@ -933,6 +949,10 @@ const JAN2: &str = "2024-01-02 12:00:00 +0000";
933949const JUL2 : & str = "2024-07-02 12:00:00 +0000" ;
934950
935951#[ test]
952+ #[ cfg_attr(
953+ wasi_runner,
954+ ignore = "WASI sandbox: timezone/locale database not visible"
955+ ) ]
936956fn test_date_tz ( ) {
937957 fn test_tz ( tz : & str , date : & str , output : & str ) {
938958 println ! ( "Test with TZ={tz}, date=\" {date}\" ." ) ;
@@ -979,6 +999,10 @@ fn test_date_tz_with_utc_flag() {
979999}
9801000
9811001#[ test]
1002+ #[ cfg_attr(
1003+ wasi_runner,
1004+ ignore = "WASI sandbox: timezone/locale database not visible"
1005+ ) ]
9821006fn test_date_tz_various_formats ( ) {
9831007 fn test_tz ( tz : & str , date : & str , output : & str ) {
9841008 println ! ( "Test with TZ={tz}, date=\" {date}\" ." ) ;
@@ -1007,6 +1031,10 @@ fn test_date_tz_various_formats() {
10071031}
10081032
10091033#[ test]
1034+ #[ cfg_attr(
1035+ wasi_runner,
1036+ ignore = "WASI sandbox: timezone/locale database not visible"
1037+ ) ]
10101038fn test_date_tz_with_relative_time ( ) {
10111039 new_ucmd ! ( )
10121040 . env ( "TZ" , "America/Vancouver" )
@@ -1018,6 +1046,10 @@ fn test_date_tz_with_relative_time() {
10181046}
10191047
10201048#[ test]
1049+ #[ cfg_attr(
1050+ wasi_runner,
1051+ ignore = "WASI sandbox: timezone/locale database not visible"
1052+ ) ]
10211053fn test_date_utc_time ( ) {
10221054 // Test that -u flag shows correct UTC time
10231055 // We get 2 UTC times just in case we're really unlucky and this runs around
@@ -1514,6 +1546,10 @@ fn test_date_whitespace_between_items() {
15141546}
15151547
15161548#[ test]
1549+ #[ cfg_attr(
1550+ wasi_runner,
1551+ ignore = "WASI sandbox: timezone/locale database not visible"
1552+ ) ]
15171553fn test_date_relative_m9 ( ) {
15181554 // Military timezone "m9" should be parsed as noon + 9 hours = 21:00 UTC
15191555 // When displayed in TZ=UTC+9 (which is UTC-9), this shows as 12:00 local time
@@ -1811,6 +1847,10 @@ fn test_date_locale_en_us_vs_c_difference() {
18111847
18121848#[ test]
18131849#[ cfg( unix) ]
1850+ #[ cfg_attr(
1851+ wasi_runner,
1852+ ignore = "WASI sandbox: timezone/locale database not visible"
1853+ ) ]
18141854fn test_date_locale_hu_hungarian ( ) {
18151855 // Regression test for uutils/coreutils#11240: the GNU modifier fast-path
18161856 // ("%-e") used to run before ICU localization, so "%b"/"%A" came out in
@@ -2102,6 +2142,10 @@ fn test_date_input_hhmm_ampm() {
21022142}
21032143
21042144#[ test]
2145+ #[ cfg_attr(
2146+ wasi_runner,
2147+ ignore = "WASI sandbox: timezone/locale database not visible"
2148+ ) ]
21052149fn test_date_input_trailing_tz_abbrev_rezones ( ) {
21062150 // `TZ=UTC+1 date -d '2024-01-01 EST'` should display the instant in UTC+1
21072151 // (GNU: 04:00:00 -01:00), not leave it in EST (the pre-fix uutils
@@ -2230,6 +2274,10 @@ fn test_date_parenthesis_vs_other_special_chars() {
22302274
22312275#[ test]
22322276#[ cfg( unix) ]
2277+ #[ cfg_attr(
2278+ wasi_runner,
2279+ ignore = "WASI sandbox: timezone/locale database not visible"
2280+ ) ]
22332281fn test_date_iranian_locale_solar_hijri_calendar ( ) {
22342282 // Test Iranian locale uses Solar Hijri calendar
22352283 // Verify the Solar Hijri calendar is used in the Iranian locale
@@ -2297,6 +2345,10 @@ fn test_date_iranian_locale_solar_hijri_calendar() {
22972345
22982346#[ test]
22992347#[ cfg( unix) ]
2348+ #[ cfg_attr(
2349+ wasi_runner,
2350+ ignore = "WASI sandbox: timezone/locale database not visible"
2351+ ) ]
23002352fn test_date_ethiopian_locale_calendar ( ) {
23012353 // Test Ethiopian locale uses Ethiopian calendar
23022354 // Verify the Ethiopian calendar is used in the Ethiopian locale
@@ -2444,6 +2496,10 @@ fn check_date(locale: &str, date: &str, fmt: &str, expected: &str) {
24442496
24452497#[ test]
24462498#[ cfg( unix) ]
2499+ #[ cfg_attr(
2500+ wasi_runner,
2501+ ignore = "WASI sandbox: timezone/locale database not visible"
2502+ ) ]
24472503fn test_locale_calendar_conversions ( ) {
24482504 // Persian (Solar Hijri) - Nowruz is March 20/21
24492505 for ( d, e) in [
@@ -2495,6 +2551,10 @@ fn test_locale_calendar_conversions() {
24952551
24962552#[ test]
24972553#[ cfg( unix) ]
2554+ #[ cfg_attr(
2555+ wasi_runner,
2556+ ignore = "WASI sandbox: timezone/locale database not visible"
2557+ ) ]
24982558fn test_locale_month_names ( ) {
24992559 // %B full month names: Jan, Jun, Dec for each locale
25002560 for ( loc, jan, jun, dec) in [
@@ -2515,6 +2575,10 @@ fn test_locale_month_names() {
25152575
25162576#[ test]
25172577#[ cfg( unix) ]
2578+ #[ cfg_attr(
2579+ wasi_runner,
2580+ ignore = "WASI sandbox: timezone/locale database not visible"
2581+ ) ]
25182582fn test_locale_abbreviated_month_names ( ) {
25192583 // %b abbreviated month names: Feb, Jun, Dec for each locale
25202584 // This test ensures we don't get double periods in locales like Hungarian
@@ -2538,6 +2602,10 @@ fn test_locale_abbreviated_month_names() {
25382602
25392603#[ test]
25402604#[ cfg( unix) ]
2605+ #[ cfg_attr(
2606+ wasi_runner,
2607+ ignore = "WASI sandbox: timezone/locale database not visible"
2608+ ) ]
25412609fn test_locale_day_names ( ) {
25422610 // %A full day names: Mon (26th), Sun (25th), Sat (24th) Jan 2026
25432611 for ( loc, mon, sun, sat) in [
@@ -2639,8 +2707,11 @@ fn test_date_month_subtraction_keeps_day() {
26392707
26402708// Tests for embedded timezone parsing
26412709#[ test]
2710+ #[ cfg_attr(
2711+ wasi_runner,
2712+ ignore = "WASI sandbox: timezone/locale database not visible"
2713+ ) ]
26422714fn test_date_embedded_timezone_conversion ( ) {
2643- // Parse date with embedded timezone
26442715 // Date should be interpreted in embedded TZ, then displayed in environment TZ
26452716 new_ucmd ! ( )
26462717 . env ( "TZ" , "UTC0" )
@@ -2655,6 +2726,7 @@ fn test_date_embedded_timezone_conversion() {
26552726// Tests for invalid UTF-8 in date string
26562727#[ test]
26572728#[ cfg( unix) ]
2729+ #[ cfg_attr( wasi_runner, ignore = "WASI: argv must be valid UTF-8" ) ]
26582730fn test_date_invalid_utf8_byte_rejected ( ) {
26592731 use std:: os:: unix:: ffi:: OsStrExt ;
26602732
0 commit comments