summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Kelley <[email protected]>2023-07-19 13:14:10 -0700
committergit <[email protected]>2024-01-17 00:45:06 +0000
commit77593495f7b08301eeb0b4a22cb07b7a6461cd8f (patch)
treeb3c49abaf2528918143a063f1fa4dd0942621d6b
parent8ae24e6b085121c6d3de61b45cf089849fe4a177 (diff)
[ruby/psych] issue #443: drop special tests for y, Y, n, N since they covered in the more general test
https://github.com/ruby/psych/commit/6750b35402
-rw-r--r--test/psych/test_string.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb
index c996a8fc2d..84ae5cbb45 100644
--- a/test/psych/test_string.rb
+++ b/test/psych/test_string.rb
@@ -17,20 +17,11 @@ module Psych
end
end
- # 'y' and 'n' are kind of ambiguous. Syck treated y and n literals in
+ # 'y', 'Y', 'n', 'N' are kind of ambiguous. Syck treated those literals in
# YAML documents as strings. But this is not what the YAML 1.1 spec says.
# YAML 1.1 says they should be treated as booleans. When we're dumping
# documents, we know it's a string, so adding quotes will eliminate the
# "ambiguity" in the emitted document
- def test_y_is_quoted
- assert_match(/"y"/, Psych.dump("y"))
- assert_match(/"Y"/, Psych.dump("Y"))
- end
-
- def test_n_is_quoted
- assert_match(/"n"/, Psych.dump("n"))
- assert_match(/"N"/, Psych.dump("N"))
- end
def test_all_yaml_1_1_booleans_are_quoted
yaml_1_1_booleans = %w[y Y yes Yes YES n N no No NO true True TRUE false False FALSE on On ON off Off OFF] # from https://yaml.org/type/bool.html