aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest-parser/driver.in
diff options
context:
space:
mode:
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)