about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2026-07-23 16:19:45 +0100
committerArun Isaac2026-07-23 16:19:45 +0100
commit0178c9c2a052578dc7bbebfba3588f54846b0e05 (patch)
tree973341d737b979104902764ec669bd6dca26d60f /tests
parent2d1144131b43f6bb1977587d59ca90cc2a7b3f10 (diff)
downloadccwl-0178c9c2a052578dc7bbebfba3588f54846b0e05.tar.gz
ccwl-0178c9c2a052578dc7bbebfba3588f54846b0e05.tar.lz
ccwl-0178c9c2a052578dc7bbebfba3588f54846b0e05.zip
yaml: Escape whitespace characters other than space. HEAD main
Diffstat (limited to 'tests')
-rw-r--r--tests/yaml.scm8
1 files changed, 7 insertions, 1 deletions
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 <arunisaac@systemreboot.net>
+;;; Copyright © 2021, 2023, 2026 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; 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]
 "