diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-21 11:09:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-21 11:14:52 +0200 |
commit | ed93f8450b92579dd639ae25361fa650613a5b7e (patch) | |
tree | c43b07d3d7723034fcbdbdf8e5ae805b6c361309 /tests/manifest-parser | |
parent | 357172f4409c74d7a2ac963290fc70c7ae10e3b1 (diff) |
Redo manifest parsing using bash co-process facility
Diffstat (limited to 'tests/manifest-parser')
-rw-r--r-- | tests/manifest-parser/driver.in | 8 | ||||
-rw-r--r-- | tests/manifest-parser/testscript | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/manifest-parser/driver.in b/tests/manifest-parser/driver.in index 90dc0e3..ffd9a64 100644 --- a/tests/manifest-parser/driver.in +++ b/tests/manifest-parser/driver.in @@ -9,7 +9,9 @@ set -o errtrace # Trap ERR in functions. @import libbutl/manifest-parser@ -while IFS=: read -r -d '' n v; do +butl_manifest_parser_start "$@" + +while IFS=: read -ru "$butl_manifest_parser_ofd" -d '' n v; do if [ -z "$n" ]; then echo "$v" else @@ -17,4 +19,6 @@ while IFS=: read -r -d '' n v; do echo "$n" echo "$v" fi -done < <(butl_parse_manifest) +done + +butl_manifest_parser_finish diff --git a/tests/manifest-parser/testscript b/tests/manifest-parser/testscript index 6a95286..154b107 100644 --- a/tests/manifest-parser/testscript +++ b/tests/manifest-parser/testscript @@ -21,3 +21,5 @@ libfoo depends libbar EOO + +#@@ TODO: test reading from file instead of stdin. |