test/grammar_test.rb in toml-rb-0.3.3 vs test/grammar_test.rb in toml-rb-0.3.4

- old
+ new

@@ -161,9 +161,17 @@ assert_equal([2], match.value) multiline_array = "[\n# comment\n#, more comments\n4]" match = Document.parse(multiline_array, root: :array) assert_equal([4], match.value) + + multiline_array = "[\n 1,\n # 2,\n 3,\n]" + match = Document.parse(multiline_array, root: :array) + assert_equal([1, 3], match.value) + + multiline_array = "[\n 1, # useless comment\n # 2,\n 3 #other comment\n]" + match = Document.parse(multiline_array, root: :array) + assert_equal([1, 3], match.value) end def test_datetime match = Document.parse('1986-08-28T15:15:00Z', root: :datetime) assert_equal(Time.utc(1986, 8, 28, 15, 15), match.value)