Skip to content

Commit

Permalink
Merge pull request #1314 from yast/ruby34
Browse files Browse the repository at this point in the history
do not test exact wording in xml exception
  • Loading branch information
jreidinger authored Jan 2, 2025
2 parents 717d99f + 0b30d36 commit 037b94b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions library/xml/test/xml_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
it "raises XMLSerializationError when key is not string" do
input = { "test" => { "a" => "b", "lest" => :lest, 1 => 2, nil => "t", :symbol => "symbol" } }

expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError, /non-string key.*nil=>"t"/)
expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError)
end

it "places keys in alphabetic sorting" do
Expand All @@ -150,13 +150,13 @@
it "raises XMLSerializationError when entry has nil as value" do
input = { "test" => { "a" => "b", "b" => "c", "c" => nil, "d" => "e", "e" => "f" } }

expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError, /represent nil, part of .*"c"=>nil/)
expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError)
end

it "raises XMLSerializationError when entry has a weird value" do
input = { "test" => /I am a Regexp/ }

expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError, /represent .*Regexp\//)
expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError)
end
end

Expand Down Expand Up @@ -193,7 +193,7 @@
it "raises XMLSerializationError when list contains nil" do
input = { "test" => ["a", "b", nil, "d", "e", "f"] }

expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError, /represent nil, part of .*"b", nil/)
expect { subject.YCPToXMLString("test", input) }.to raise_error(Yast::XMLSerializationError)
end
end

Expand Down
6 changes: 6 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 2 06:51:16 UTC 2025 - Josef Reidinger <[email protected]>

- Fix failing tests with ruby 3.4 (gh#yast/yast-yast2#1314)
- 5.0.11

-------------------------------------------------------------------
Tue Oct 1 13:28:34 UTC 2024 - Stefan Hundhammer <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 5.0.10
Version: 5.0.11

Release: 0
Summary: YaST2 Main Package
Expand Down

0 comments on commit 037b94b

Please sign in to comment.