summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-11 10:19:29 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-11 10:42:22 +0900
commiteb737916b1e435ff8212913c03e5798089b0d3fe (patch)
tree924832351005da6aa5aba1d0bbb21908f24b306c /test
parent8bb24712de04cfa8bb1dbfc0c3cee3de6eb4b40d (diff)
Warn when :newline precedes other newline options
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_econv.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index caa0fca8b7..5a4af9b6a3 100644
--- a/test/ruby/test_econv.rb
+++ b/test/ruby/test_econv.rb
@@ -922,7 +922,9 @@ class TestEncodingConverter < Test::Unit::TestCase
end
newlines.each do |nl|
opts = {newline: :universal, nl => true}
- ec2 = Encoding::Converter.new("", "", **opts)
+ ec2 = assert_warning(/:newline option preceds/, opts.inspect) do
+ Encoding::Converter.new("", "", **opts)
+ end
assert_equal(ec1, ec2)
end
end