From 0178c9c2a052578dc7bbebfba3588f54846b0e05 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 23 Jul 2026 16:19:45 +0100 Subject: yaml: Escape whitespace characters other than space. --- tests/yaml.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/yaml.scm b/tests/yaml.scm index f9df12d..c475dd9 100644 --- a/tests/yaml.scm +++ b/tests/yaml.scm @@ -1,5 +1,5 @@ ;;; ccwl --- Concise Common Workflow Language -;;; Copyright © 2021, 2023 Arun Isaac +;;; Copyright © 2021, 2023, 2026 Arun Isaac ;;; ;;; This file is part of ccwl. ;;; @@ -41,6 +41,12 @@ bar: {} " (scm->yaml-string #("*foo" "*bar"))) +(test-equal "strings with whitespace characters other than space must be escaped" + "- \"foo\\nbar\" +- \"foo\\tbar\" +" + (scm->yaml-string #("foo\nbar" "foo\tbar"))) + (test-equal "single element vectors must be serialized on the same line" "[foo] " -- cgit 1.4.1