Skip to content

Commit 6750b35

Browse files
committed
issue #443: drop special tests for y, Y, n, N since they covered in the more general test
1 parent 93c8fb4 commit 6750b35

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

test/psych/test_string.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,11 @@ def initialize
1717
end
1818
end
1919

20-
# 'y' and 'n' are kind of ambiguous. Syck treated y and n literals in
20+
# 'y', 'Y', 'n', 'N' are kind of ambiguous. Syck treated those literals in
2121
# YAML documents as strings. But this is not what the YAML 1.1 spec says.
2222
# YAML 1.1 says they should be treated as booleans. When we're dumping
2323
# documents, we know it's a string, so adding quotes will eliminate the
2424
# "ambiguity" in the emitted document
25-
def test_y_is_quoted
26-
assert_match(/"y"/, Psych.dump("y"))
27-
assert_match(/"Y"/, Psych.dump("Y"))
28-
end
29-
30-
def test_n_is_quoted
31-
assert_match(/"n"/, Psych.dump("n"))
32-
assert_match(/"N"/, Psych.dump("N"))
33-
end
3425

3526
def test_all_yaml_1_1_booleans_are_quoted
3627
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

0 commit comments

Comments
 (0)