[Bug #500] TZ=HST$B$G(BFailure: test_strftime(TestTime)

Bug #500: TZ=HSTe$B$Ge(BFailure: test_strftime(TestTime)
http://redmine.ruby-lang.org/issues/show/500

e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal

http://zunda.freeshell.org/d/20080825.html#p04
e$B$K$h$k$H%m!<%+%k$N%?%$%`%>!<%s$K$h$C$F$O<:GT$9$k$3$H$,$"$k$h$&$G$9!#e(B

% env TZ=HST ruby-trunk -v test/ruby/test_time.rb -n /strftime/
ruby 1.9.0 (2008-08-25 revision 18832) [i686-linux]
Loaded suite test/ruby/test_time
Started
test/ruby/test_time.rb:377: warning: strftime called with empty format
string
F
Finished in 0.01258855 seconds.

  1. Failure:
    test_strftime(TestTime) [test/ruby/test_time.rb:381]:
    <“Sat”> expected but was
    <“Fri”>.

1 tests, 26 assertions, 1 failures, 0 errors

e$BA0ED$G$9!#e(B

2008/08/27 1:23 Kazuhiro NISHIYAMA [email protected]:

http://zunda.freeshell.org/d/20080825.html#p04
e$B$K$h$k$H%m!<%+%k$N%?%$%`%>!<%s$K$h$C$F$O<:GT$9$k$3$H$,$"$k$h$&$G$9!#e(B

% env TZ=HST ruby-trunk -v test/ruby/test_time.rb -n /strftime/
ruby 1.9.0 (2008-08-25 revision 18832) [i686-linux]
Loaded suite test/ruby/test_time
Started
test/ruby/test_time.rb:377: warning: strftime called with empty format string
F
Finished in 0.01258855 seconds.

e$B1sF#$5$s$,e(Br15399e$B$GDI2C$5$l$?%F%9%H$N$h$&$G$9$,!“$b$H$b$H$I$&$$$&0U?^$N%F%9%He(B
e$B$G$7$g$&$+e(B?
e$B$H$j$”$($:!"0J2<$N$h$&$KJQ$($l$P4D6-JQ?te(BTZe$B$NCM$K$h$i$:%F%9%H$,DL$k$h$&$K$Oe(B
e$B$J$j$^$9$,!D!#e(B

Index: test/ruby/test_time.rb

— test/ruby/test_time.rb (revision 18897)
+++ test/ruby/test_time.rb (working copy)
@@ -378,7 +378,8 @@
assert_equal(“foo\0bar\x0000\x0000\x0000”,
T2000.strftime(“foo\0bar\0%H\0%M
\0%S”))
assert_equal(“foo” * 1000, T2000.strftime(“foo” * 1000))

  • assert_equal(“Sat”, Time.at(946684800).strftime(“%a”))
  • t = Time.mktime(2000, 1, 1)

  • assert_equal(“Sat”, t.strftime(“%a”))

    t = Time.at(946684800, 123456.789)
    assert_equal(“123”, t.strftime(“%3N”))

e$B1sF#$G$9!#e(B

2008/08/28 22:35 Shugo M. [email protected]:

Finished in 0.01258855 seconds.

e$B1sF#$5$s$,e(Br15399e$B$GDI2C$5$l$?%F%9%H$N$h$&$G$9$,!"$b$H$b$H$I$&$$$&0U?^$N%F%9%He(B
e$B$G$7$g$&$+e(B?

e$B$9$_$^$;$s!#DI2C$7$?$H$-$N5-21$,$9$G$K$“$j$^$;$s$,!“e(Bstrftime(”%a”)
e$B$Ne(B
e$BLa$jCM$r%F%9%H$7$?$+$C$?$@$1$@$H;W$o$l$^$9!#$G$9$N$G!"e(B

e$B$H$j$"$($:!"0J2<$N$h$&$KJQ$($l$P4D6-JQ?te(BTZe$B$NCM$K$h$i$:%F%9%H$,DL$k$h$&$K$Oe(B
e$B$J$j$^$9$,!D!#e(B

e$B$3$l$G$$$$$H;W$$$^$9!#$"$j$,$H$&$4$6$$$^$9!#%3%_%C%H$7$F$*$-$^$9!#e(B

e$B%A%1%C%He(B #500 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r18901.

http://redmine.ruby-lang.org/issues/show/500