From df347d9a082d893527bd27536ff7097f87a52961 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 16 Feb 2024 21:07:35 +0100 Subject: [PATCH] test find --- tests-ng/test-tree.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests-ng/test-tree.sh b/tests-ng/test-tree.sh index ac269e4..cd6eef7 100755 --- a/tests-ng/test-tree.sh +++ b/tests-ng/test-tree.sh @@ -30,9 +30,14 @@ out="${tmpd}/output.txt" # tree echo ">>> test tree no arg <<<" "${bin}" --debug tree -c "${catalog}" | sed -e 's/\x1b\[[0-9;]*m//g' > "${out}" +echo "---" +find "${cur}/../" -not -path '*/.git*' +echo "---" +cat "${out}" +echo "---" expected=$(find "${cur}/../" -not -path '*/.git*' | tail -n +2 | wc -l) cnt=$(wc -l "${out}" | awk '{print $1}') -[ "${cnt}" != "${expected}" ] && echo "expecting ${expected} lines (${cnt})" && exit 1 +[ "${cnt}" != "${expected}" ] && echo "expecting ${expected} lines got ${cnt}" && exit 1 # tree with arg echo ">>> test tree with arg <<<"