From bf737f367254e3fd3bfda1a7cd0d7c32e8eeff02 Mon Sep 17 00:00:00 2001 From: Jon Harper Date: Wed, 21 May 2014 22:31:13 +0200 Subject: [PATCH] YAML: tests for emitter-line-break variable --- extra/yaml/yaml-tests.factor | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/extra/yaml/yaml-tests.factor b/extra/yaml/yaml-tests.factor index 17e6f63801..6d194b6610 100644 --- a/extra/yaml/yaml-tests.factor +++ b/extra/yaml/yaml-tests.factor @@ -1,7 +1,8 @@ ! Copyright (C) 2014 Jon Harper. ! See http://factorcode.org/license.txt for BSD license. -USING: assocs kernel linked-assocs literals locals sequences -tools.test yaml yaml.private yaml.config grouping namespaces ; +USING: assocs grouping kernel linked-assocs literals locals +namespaces sequences tools.test yaml yaml.config yaml.ffi +yaml.private ; IN: yaml.tests ! 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 ] 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