orcli/tests/help.sh

20 lines
343 B
Bash
Raw Permalink Normal View History

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