branch: externals/tomelr commit 57bed2cca8b648d2abc6da525a3420b3e968efb4 Author: Kaushal Modi <kaushal.m...@gmail.com> Commit: Kaushal Modi <kaushal.m...@gmail.com>
test: Add a test for string scalar with blank lines --- test/tscalar.el | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/test/tscalar.el b/test/tscalar.el index 47d38167be..e6ede6d85a 100644 --- a/test/tscalar.el +++ b/test/tscalar.el @@ -78,15 +78,28 @@ ;;;; Scalar - String (ert-deftest test-scalar-string () - (let ((inp '(((string1 . "Roses are red")) + (let ((inp '( + ((string1 . "Roses are red")) ((string2 . "Roses are red\nViolets are blue")) ;Newline in string - ((string3 . "\"Hello!\"")))) ;Quote in string - (ref '("string1 = \"Roses are red\"" + ((string3 . "\"Hello!\"")) ;Quote in string + ((string4 . "Line 1\n\nLine 3\n\n Line 5 with 2 space indentation\n\nLine 7")) ;Blank lines in string + )) + (ref '( + "string1 = \"Roses are red\"" "string2 = \"\"\" Roses are red Violets are blue\"\"\"" "string3 = \"\"\" -\"Hello!\"\"\"\"")) +\"Hello!\"\"\"\"" + "string4 = \"\"\" +Line 1 + +Line 3 + + Line 5 with 2 space indentation + +Line 7\"\"\"" + )) out) (dolist (el inp) (push (tomelr-encode el) out))