orcli/tests/help.sh

20 lines
324 B
Bash
Raw Normal View History

2022-12-03 01:30:01 +01:00
#!/bin/bash
t="help"
# environment
tmpdir="$(mktemp -d)"
trap '{ rm -rf "${tmpdir}"; }' 0 2 3 15
cd "${tmpdir}" || exit 1
# assertion
cat << "DATA" > "${t}.assert"
orcli - OpenRefine command-line interface written in Bash
DATA
# action
orcli --help | head -n1 > "${t}.output"
# test
diff -u "${t}.assert" "${t}.output"