add test for info command

This commit is contained in:
felixlohmeier 2022-12-06 16:21:11 +00:00
parent 11473dc1c1
commit a8532e9853
1 changed files with 9 additions and 2 deletions

View File

@ -9,10 +9,17 @@ trap '{ rm -rf "${tmpdir}"; }' 0 2 3 15
# input
cp data/example.csv "${tmpdir}/${t}.csv"
# assertion
cat << "DATA" > "${tmpdir}/${t}.assert"
a
b
c
DATA
# action
cd "${tmpdir}" || exit 1
orcli import csv "${t}.csv"
orcli info "${t} csv"
orcli info "${t} csv" | jq -r .columns[] > "${t}.output"
# test
# grep "${t}" "${t}.output"
diff -u "${t}.assert" "${t}.output"