Prechádzať zdrojové kódy

add failing test cases

Songmu 11 rokov pred
rodič
commit
43a0256bb2
1 zmenil súbory, kde vykonal 10 pridanie a 0 odobranie
  1. 10 0
      encode_test.go

+ 10 - 0
encode_test.go

@@ -306,6 +306,16 @@ var marshalTests = []struct {
 		map[string]string{"a": "b: c"},
 		"a: 'b: c'\n",
 	},
+
+	// Containing hash mark ('#') in string should be quoted
+	{
+		map[string]string{"a": "Hello #comment"},
+		"a: 'Hello #comment'\n",
+	},
+	{
+		map[string]string{"a": "你好 #comment"},
+		"a: '你好 #comment'\n",
+	},
 }
 
 func (s *S) TestMarshal(c *C) {