@@ -1622,6 +1622,32 @@ fn test_date_locale_en_us_vs_c_difference() {
16221622 }
16231623}
16241624
1625+ #[ test]
1626+ #[ cfg( unix) ]
1627+ fn test_date_locale_hu_hungarian ( ) {
1628+ // Regression test for uutils/coreutils#11240: the GNU modifier fast-path
1629+ // ("%-e") used to run before ICU localization, so "%b"/"%A" came out in
1630+ // English even under hu_HU.UTF-8. Pin an explicit format string so the
1631+ // assertion is deterministic across glibc versions (the default D_T_FMT
1632+ // for hu_HU differs between distros).
1633+ if !is_locale_available ( "hu_HU.UTF-8" ) {
1634+ return ;
1635+ }
1636+
1637+ let result = new_ucmd ! ( )
1638+ . env ( "LC_ALL" , "hu_HU.UTF-8" )
1639+ . env ( "TZ" , "UTC" )
1640+ . arg ( "-d" )
1641+ . arg ( "2025-12-14T13:00:00" )
1642+ . arg ( "+%Y. %b %-e., %A, %H:%M:%S %Z" )
1643+ . succeeds ( ) ;
1644+
1645+ assert_eq ! (
1646+ result. stdout_str( ) ,
1647+ "2025. dec 14., vasárnap, 13:00:00 UTC\n "
1648+ ) ;
1649+ }
1650+
16251651#[ test]
16261652#[ cfg( any( target_os = "linux" , target_os = "android" , target_vendor = "apple" ) ) ]
16271653fn test_date_locale_fr_french ( ) {
@@ -2273,6 +2299,7 @@ fn test_locale_month_names() {
22732299 ( "es_ES.UTF-8" , "enero" , "junio" , "diciembre" ) ,
22742300 ( "it_IT.UTF-8" , "gennaio" , "giugno" , "dicembre" ) ,
22752301 ( "pt_BR.UTF-8" , "janeiro" , "junho" , "dezembro" ) ,
2302+ ( "hu_HU.UTF-8" , "január" , "június" , "december" ) ,
22762303 ( "ja_JP.UTF-8" , "1月" , "6月" , "12月" ) ,
22772304 ( "zh_CN.UTF-8" , "一月" , "六月" , "十二月" ) ,
22782305 ] {
0 commit comments