зеркало из https://github.com/go-gitea/yaml.git
Added quoted multi-line string test.
This commit is contained in:
Родитель
914e67f109
Коммит
d0b6f3facf
|
@ -267,6 +267,9 @@ var unmarshalTests = []struct {
|
|||
{
|
||||
"'1': '\"2\"'",
|
||||
map[interface{}]interface{}{"1": "\"2\""},
|
||||
}, {
|
||||
"v:\n- A\n- 'B\n\n C'\n",
|
||||
map[string][]string{"v": []string{"A", "B\nC"}},
|
||||
},
|
||||
|
||||
// Explicit tags.
|
||||
|
|
|
@ -84,6 +84,9 @@ var marshalTests = []struct {
|
|||
}, {
|
||||
map[string][]string{"v": []string{"A", "B"}},
|
||||
"v:\n- A\n- B\n",
|
||||
}, {
|
||||
map[string][]string{"v": []string{"A", "B\nC"}},
|
||||
"v:\n- A\n- 'B\n\n C'\n",
|
||||
}, {
|
||||
map[string][]interface{}{"v": []interface{}{"A", 1, map[string][]int{"B": []int{2, 3}}}},
|
||||
"v:\n- A\n- 1\n- B:\n - 2\n - 3\n",
|
||||
|
|
Загрузка…
Ссылка в новой задаче