File tree Expand file tree Collapse file tree 4 files changed +3
-16
lines changed Expand file tree Collapse file tree 4 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,12 @@ jobs:
16
16
- {os: ubuntu-18.04, ruby: 2.5}
17
17
- {os: ubuntu-18.04, ruby: 2.6}
18
18
- {os: ubuntu-18.04, ruby: 2.7}
19
+ - {os: ubuntu-18.04, ruby: 3.0}
19
20
- {os: ubuntu-18.04, ruby: jruby-9.2.9.0}
20
21
- {os: windows-2016, ruby: 2.5}
21
22
- {os: windows-2016, ruby: 2.6}
22
23
- {os: windows-2016, ruby: 2.7}
24
+ - {os: windows-2016, ruby: 3.0}
23
25
24
26
runs-on : ${{ matrix.cfg.os }}
25
27
steps :
Original file line number Diff line number Diff line change @@ -84,10 +84,6 @@ def foo
84
84
85
85
context 'when loading files from disk' do
86
86
it 'should always read files as UTF-8' do
87
- if Puppet ::Util ::Platform . windows? && Encoding . default_external == Encoding ::UTF_8
88
- raise 'This test must be run in a codepage other than 65001 to validate behavior'
89
- end
90
-
91
87
module_dir = dir_containing ( 'testmodule' , {
92
88
'lib' => { 'puppet' => { 'functions' => { 'testmodule' => {
93
89
'foo.rb' => code_utf8
@@ -101,11 +97,6 @@ def foo
101
97
102
98
it 'currently ignores the UTF-8 BOM (Byte Order Mark) when loading module files' do
103
99
bom = "\uFEFF "
104
-
105
- if Puppet ::Util ::Platform . windows? && Encoding . default_external == Encoding ::UTF_8
106
- raise 'This test must be run in a codepage other than 65001 to validate behavior'
107
- end
108
-
109
100
module_dir = dir_containing ( 'testmodule' , {
110
101
'lib' => { 'puppet' => { 'functions' => { 'testmodule' => {
111
102
'foo.rb' => "#{ bom } #{ code_utf8 } "
Original file line number Diff line number Diff line change @@ -918,10 +918,6 @@ def expect_issue(code, issue)
918
918
919
919
context 'when lexing files from disk' do
920
920
it 'should always read files as UTF-8' do
921
- if Puppet ::Util ::Platform . windows? && Encoding . default_external == Encoding ::UTF_8
922
- raise 'This test must be run in a codepage other than 65001 to validate behavior'
923
- end
924
-
925
921
manifest_code = "notify { '#{ rune_utf8 } ': }"
926
922
manifest = file_containing ( 'manifest.pp' , manifest_code )
927
923
lexed_file = described_class . new . lex_file ( manifest )
Original file line number Diff line number Diff line change @@ -142,9 +142,7 @@ def withenv_utf8(&block)
142
142
143
143
# In 2.3, the behavior is mostly correct when external codepage is 65001 / UTF-8
144
144
it "works around Ruby bug 8822 (which fails to preserve UTF-8 properly when accessing ENV) (Ruby >= 2.3.x) " ,
145
- :if => Puppet ::Util ::Platform . windows? do
146
-
147
- raise 'This test requires a non-UTF8 codepage' if Encoding . default_external == Encoding ::UTF_8
145
+ :if => Puppet ::Util ::Platform . windows? && RUBY_VERSION . to_f < 3 do
148
146
149
147
withenv_utf8 do |utf_8_key , utf_8_value , codepage_key |
150
148
# Ruby 2.3 fixes access by the original UTF-8 key, and behaves differently than 2.1
You can’t perform that action at this time.
0 commit comments