Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/ubuntu-jruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: gem install ruby-maven power_assert test-unit rake-compiler
run: bundle install --jobs 1
- name: compile
run: rake compile
run: bundle exec rake compile
- name: test
continue-on-error: true
run: rake test
run: bundle exec rake test
6 changes: 6 additions & 0 deletions test/psych/test_coder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def test_coder_style_map_default
end

def test_coder_style_map_any
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

foo = Psych.dump CustomEncode.new \
map: {a: 1, b: 2},
style: Psych::Nodes::Mapping::ANY,
Expand All @@ -228,6 +230,8 @@ def test_coder_style_map_any
end

def test_coder_style_map_block
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

foo = Psych.dump CustomEncode.new \
map: {a: 1, b: 2},
style: Psych::Nodes::Mapping::BLOCK,
Expand All @@ -236,6 +240,8 @@ def test_coder_style_map_block
end

def test_coder_style_map_flow
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

foo = Psych.dump CustomEncode.new \
map: { a: 1, b: 2 },
style: Psych::Nodes::Mapping::FLOW,
Expand Down
7 changes: 7 additions & 0 deletions test/psych/test_encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def test_io_utf8_read_as_binary
end

def test_emit_alias
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@emitter.start_stream Psych::Parser::UTF8
@emitter.start_document [], [], true
e = assert_raise(RuntimeError) do
Expand Down Expand Up @@ -151,6 +153,7 @@ def test_start_mapping
@emitter.end_mapping
@emitter.end_document false
@emitter.end_stream
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@parser.parse @buffer.string
assert_encodings @utf8, @handler.strings
Expand All @@ -170,6 +173,7 @@ def test_start_sequence
@emitter.end_sequence
@emitter.end_document false
@emitter.end_stream
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@parser.parse @buffer.string
assert_encodings @utf8, @handler.strings
Expand All @@ -187,6 +191,7 @@ def test_doc_tag_encoding
@emitter.scalar 'foo', nil, nil, true, false, Nodes::Scalar::ANY
@emitter.end_document false
@emitter.end_stream
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@parser.parse @buffer.string
assert_encodings @utf8, @handler.strings
Expand Down Expand Up @@ -263,6 +268,8 @@ def test_doc_tag
end

def test_dump_non_ascii_string_to_file
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

Tempfile.create(['utf8', 'yml'], :encoding => 'UTF-8') do |t|
h = {'one' => 'いち'}
Psych.dump(h, t)
Expand Down
8 changes: 8 additions & 0 deletions test/psych/test_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def test_filename

def test_line_numbers
assert_equal 0, @parser.mark.line
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@parser.parse "---\n- hello\n- world"
line_calls = @handler.marks.map(&:line).zip(@handler.calls.map(&:first))
assert_equal [
Expand All @@ -110,6 +112,8 @@ def test_line_numbers

def test_column_numbers
assert_equal 0, @parser.mark.column
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@parser.parse "---\n- hello\n- world"
col_calls = @handler.marks.map(&:column).zip(@handler.calls.map(&:first))
assert_equal [
Expand All @@ -135,6 +139,8 @@ def test_column_numbers

def test_index_numbers
assert_equal 0, @parser.mark.index
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@parser.parse "---\n- hello\n- world"
idx_calls = @handler.marks.map(&:index).zip(@handler.calls.map(&:first))
assert_equal [
Expand Down Expand Up @@ -352,6 +358,8 @@ def test_start_document_tag
end

def test_event_location
pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/

@parser.parse "foo:\n" \
" barbaz: [1, 2]"

Expand Down