YAML: Add tests for anchors in yaml>

db4
Jon Harper 2014-03-17 21:39:14 +01:00 committed by John Benediktsson
parent b60d1c86f9
commit 7925686dbc
1 changed files with 16 additions and 0 deletions

View File

@ -65,6 +65,22 @@ ${ test-objs } [ $ test-docs yaml-docs> ] unit-test
${ test-docs } [ $ test-objs >yaml-docs ] unit-test
${ test-docs } [ $ test-docs yaml-docs> >yaml-docs ] unit-test
! Anchors
CONSTANT: test-anchors """- &1 "1"
- *1
- &2 ["1","2"]
- *2
- &3
*1 : "one"
- *3
"""
CONSTANT: test-anchors-obj {
"1" "1" { "1" "2" } { "1" "2" } H{ { "1" "one" } } H{ { "1" "one" } }
}
${ test-anchors-obj } [ $ test-anchors yaml> ] unit-test
${ test-anchors-obj } [ $ test-anchors-obj >yaml yaml> ] unit-test
! Lifted from pyyaml
! http://pyyaml.org/browser/pyyaml/trunk/tests/data