aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest-parser/driver.in
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-07-20 14:35:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-07-20 14:35:28 +0200
commit357172f4409c74d7a2ac963290fc70c7ae10e3b1 (patch)
tree3c857e1803d9840734fe2af59c328793fb7455e6 /tests/manifest-parser/driver.in
parent53d459271375a3fafb80f26d11ab13b00f468ef9 (diff)
Switch to bash build2 module
Diffstat (limited to 'tests/manifest-parser/driver.in')
-rw-r--r--tests/manifest-parser/driver.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/manifest-parser/driver.in b/tests/manifest-parser/driver.in
new file mode 100644
index 0000000..90dc0e3
--- /dev/null
+++ b/tests/manifest-parser/driver.in
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# file : tests/manifest-parser/driver.in
+# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+trap "{ exit 1; }" ERR
+set -o errtrace # Trap ERR in functions.
+
+@import libbutl/manifest-parser@
+
+while IFS=: read -r -d '' n v; do
+ if [ -z "$n" ]; then
+ echo "$v"
+ else
+ echo # Extra newline after first pair.
+ echo "$n"
+ echo "$v"
+ fi
+done < <(butl_parse_manifest)