Skip to content

Commit

Permalink
test find
Browse files Browse the repository at this point in the history
  • Loading branch information
deadc0de6 committed Feb 16, 2024
1 parent a36e87f commit df347d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests-ng/test-tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<<"
Expand Down

0 comments on commit df347d9

Please sign in to comment.