orcli/tests/help.sh

20 lines
343 B
Bash
Raw Normal View History

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