From 8b0fe501e77a1f4032a396b97ad317f09e160ee3 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 8 Apr 2019 16:36:39 +0300 Subject: Add support for manifest serializing long lines mode --- tests/manifest-serializer/driver.in | 4 +-- tests/manifest-serializer/testscript | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/manifest-serializer/driver.in b/tests/manifest-serializer/driver.in index 7c4efad..2703d03 100644 --- a/tests/manifest-serializer/driver.in +++ b/tests/manifest-serializer/driver.in @@ -23,9 +23,9 @@ while read -r n; do break else if [ "$f" ]; then - f= + f= else - printf "\n" >&"$fd" + printf "\n" >&"$fd" fi printf "%s" "$v" >&"$fd" fi diff --git a/tests/manifest-serializer/testscript b/tests/manifest-serializer/testscript index d027b7a..c3da2c3 100644 --- a/tests/manifest-serializer/testscript +++ b/tests/manifest-serializer/testscript @@ -3,6 +3,7 @@ # license : MIT; see accompanying LICENSE file : stdout +: { $* <>EOO @@ -38,6 +39,7 @@ } : file +: { $* <=file; @@ -58,6 +60,7 @@ } : list +: { $* <>EOO @@ -79,6 +82,58 @@ EOO } +: break-lines +: +{ + $* <>EOO + + 1 + + name + foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + EOI + : 1 + name: foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\ + oooo + EOO +} + +: long-lines +: +{ + : file + : + { + $* --long-lines file <=file; + + 1 + + name + foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + EOI + + cat file >>EOO + : 1 + name: foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + EOO + } + + : stdout + : + { + $* --long-lines <>EOO + + 1 + + name + foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + EOI + : 1 + name: foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + EOO + } +} + : version : { -- cgit v1.1