YAML: tests for emitter-line-break variable

db4
Jon Harper 2014-05-21 22:31:13 +02:00 committed by John Benediktsson
parent 0da786e9e6
commit bf737f3672
1 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,8 @@
! Copyright (C) 2014 Jon Harper. ! Copyright (C) 2014 Jon Harper.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: assocs kernel linked-assocs literals locals sequences USING: assocs grouping kernel linked-assocs literals locals
tools.test yaml yaml.private yaml.config grouping namespaces ; namespaces sequences tools.test yaml yaml.config yaml.ffi
yaml.private ;
IN: yaml.tests IN: yaml.tests
! TODO real conformance tests here ! TODO real conformance tests here
@ -634,3 +635,16 @@ t emitter-canonical [
" "
} [ { { "a string that can be split in lots of places" } } >yaml ] unit-test } [ { { "a string that can be split in lots of places" } } >yaml ] unit-test
] with-variables ] with-variables
! line break
YAML_LN_BREAK emitter-line-break [
{ "- foo\n" } [ { "foo" } >yaml ] unit-test
] with-variable
YAML_CR_BREAK emitter-line-break [
{ "- foo\r" } [ { "foo" } >yaml ] unit-test
] with-variable
YAML_CRLN_BREAK emitter-line-break [
{ "- foo\r\n" } [ { "foo" } >yaml ] unit-test
] with-variable