Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Normal
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Environment:
Puppet 4.8.2 (stable branch on puppet, post 4.8.2 release)
Windows Server 2012 R2 Japanese (VMPooler)
Ruby x64 2.3.0 with devkit
-
Template:customfield_10700 165543
-
QA Risk Assessment:Needs Assessment
Description
We have a few tests about the strange ENV behaviour with UTF8 keys and values on Windows. I was testing on the Windows 2012 R2 Japanese edition and came across a strange spec failure;
Administrator@WRXQLJ627XIYM5K c:\source\puppet
|
$ bundle exec rspec ./spec/unit/util_spec.rb:185
|
Run options:
|
include {:locations=>{"./spec/unit/util_spec.rb"=>[185]}}
|
exclude {:broken=>true, :benchmark=>true}
|
F
|
|
Failures:
|
|
1) Puppet::Util#withenv on Windows works around Ruby bug 8822 (which fails to preserve UTF-8 properly when accessing ENV) (Ruby >= 2.3.x)
|
Failure/Error: expect(ENV.key?(codepage_key)).to eq(false)
|
|
expected: false
|
got: true
|
|
(compared using ==)
|
# ./spec/unit/util_spec.rb:193:in `block (4 levels) in <top (required)>'
|
# ./spec/unit/util_spec.rb:136:in `block in withenv_utf8'
|
# ./lib/puppet/util.rb:128:in `withenv'
|
# ./spec/unit/util_spec.rb:129:in `withenv_utf8'
|
# ./spec/unit/util_spec.rb:188:in `block (3 levels) in <top (required)>'
|
|
Finished in 6.8 seconds (files took 1.41 seconds to load)
|
1 example, 1 failure
|
|
Failed examples:
|
|
rspec ./spec/unit/util_spec.rb:185 # Puppet::Util#withenv on Windows works around Ruby bug 8822 (which fails to preserve UTF-8 properly when accessing ENV) (Ruby >= 2.3.x)
|
|
|
Administrator@WRXQLJ627XIYM5K c:\source\puppet
|
$ chcp
|
現在のコード ページ: 932
|
|
Administrator@WRXQLJ627XIYM5K c:\source\puppet
|
$ ruby --version
|
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
|
|
Administrator@WRXQLJ627XIYM5K c:\source\puppet
|
$ bundle exec puppet --version
|
4.8.2
|
|
Administrator@WRXQLJ627XIYM5K c:\source\puppet
|
$
|