4 # Copyright 2019, Juniper Networks, Inc.
6 # This SOFTWARE is licensed under the LICENSE provided in the
7 # ../Copyright file. By downloading, installing, copying, or otherwise
8 # using the SOFTWARE, you agree to be bound by the terms of that
16 # This is testing --wrap, --open, --close, --top-wrap, etc, so
17 # the output is not a single valid document
19 set -- 'The capital of {:state} is {:city}\n' 'North Carolina' Raleigh
21 ${XOP} --top-wrap --open a/b/c "$@"
22 ${XOP} --top-wrap --close a/b/c --not-first "$@"
24 ${XOP} --top-wrap --wrap a/b/c "$@"
26 ${XOP} --top-wrap --open a/b/c "$@"
27 ${XOP} --depth 4 --not-first --wrap d/e/f "$@"
28 ${XOP} --top-wrap --close a/b/c --not-first "$@"
30 ${XOP} --wrap a/b/c "$@"
32 ${XOP} --top-wrap --wrap a/b/c "$@"
34 ${XOP} --top-wrap "test\n"
38 ${XOP} --continuation "$@"
41 ${XOP} --top-wrap --open top/data
42 ${XOP} --depth 2 'First {:tag} ' value1
43 ${XOP} --depth 2 --continuation 'and then {:tag}\n' value2
44 ${XOP} --top-wrap --close top/data
49 ${XOP} --open-list machine
51 for name in red green blue; do
52 ${XOP} --depth 1 $NF --open-instance machine
53 ${XOP} --depth 2 "Machine {k:name} has {:memory}\n" $name 55
54 ${XOP} --depth 1 --close-instance machine
57 ${XOP} $NF --close-list machine