Commit bfc1a955

bfc1a95522b1Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 1 file · ~1 modified

Description

test: avoid %F in strftime test (MinGW unsupported)

The strftime buffer test used %F, but MinGW's libc strftime doesn't implement the C99 %F directive (it returns ""), so the test failed on the windows-mingw CI job while passing on Linux/macOS. sp_time_strftime calls strftime(3) directly, so it inherits that platform limitation. Use %Y-%m-%d instead -- same output, and what the test exercises is the widened output buffer, not %F. No behavior change; .expected unchanged.

Co-Authored-By: Claude Opus 4.8 [email protected]

Details

Commit
bfc1a95522b1
Parent
b885f637dd8f

test/time_strftime_long_format.rbmodifiedView file

@@ -5,7 +5,10 @@
55 # that case isn't asserted here because CRuby raises Errno::ERANGE for it.
66 t = Time.at(0).utc
77
8-puts t.strftime("%F")
8+# %Y-%m-%d rather than %F: MinGW's libc strftime doesn't implement the
9+# C99 %F directive (it returns ""), and this helper calls strftime(3)
10+# directly. The buffer fix is what this test exercises, not %F.
11+puts t.strftime("%Y-%m-%d")
912 puts t.strftime("%Y-%m-%d %H:%M:%S")
1013
1114 # ~500 bytes of output from a repeated directive