Skip to content

Commit

Permalink
Updated the test suite to handle ASCII-8BIT renaming. (casperisfine)
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/minitest/dev/": change = 13319]
  • Loading branch information
zenspider committed Feb 25, 2022
1 parent fe3992e commit fb48a97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/minitest/test_minitest_assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def test_assert_equal_string_encodings
@@ -1,3 +1,3 @@
-# encoding: UTF-8
-# valid: false
+# encoding: ASCII-8BIT
+# encoding: #{Encoding::BINARY.name}
+# valid: true
"bad-utf8-\\xF1.txt"
EOM
Expand All @@ -373,7 +373,7 @@ def test_assert_equal_string_encodings_both_different
@@ -1,3 +1,3 @@
-# encoding: US-ASCII
-# valid: false
+# encoding: ASCII-8BIT
+# encoding: #{Encoding::BINARY.name}
+# valid: true
"bad-utf8-\\xF1.txt"
EOM
Expand Down Expand Up @@ -1528,14 +1528,14 @@ def test_mu_pp_for_diff_str_bad_encoding_both

def test_mu_pp_for_diff_str_encoding
str = "A\nB".b
exp = "# encoding: ASCII-8BIT\n# valid: true\n\"A\nB\""
exp = "# encoding: #{Encoding::BINARY.name}\n# valid: true\n\"A\nB\""

assert_mu_pp_for_diff exp, str, :raw
end

def test_mu_pp_for_diff_str_encoding_both
str = "A\\n\nB".b
exp = "# encoding: ASCII-8BIT\n# valid: true\n\"A\\\\n\\nB\""
exp = "# encoding: #{Encoding::BINARY.name}\n# valid: true\n\"A\\\\n\\nB\""

assert_mu_pp_for_diff exp, str, :raw
end
Expand Down Expand Up @@ -1575,7 +1575,7 @@ def test_mu_pp_str_bad_encoding

def test_mu_pp_str_encoding
str = "A\nB".b
exp = "# encoding: ASCII-8BIT\n# valid: true\n\"A\\nB\""
exp = "# encoding: #{Encoding::BINARY.name}\n# valid: true\n\"A\\nB\""

assert_mu_pp exp, str, :raw
end
Expand Down

0 comments on commit fb48a97

Please sign in to comment.