support ./orcli test
This commit is contained in:
parent
8b2e35ced2
commit
56c9bbe21e
|
@ -137,3 +137,9 @@ orcli uses [bashly](https://github.com/DannyBen/bashly/) for generating the one-
|
||||||
```sh
|
```sh
|
||||||
bashly generate --upgrade
|
bashly generate --upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
|
4. Run tests
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./orcli test
|
||||||
|
```
|
14
orcli
14
orcli
|
@ -1043,13 +1043,6 @@ orcli_test_command() {
|
||||||
# src/test_command.sh
|
# src/test_command.sh
|
||||||
# shellcheck shell=bash disable=SC2154
|
# shellcheck shell=bash disable=SC2154
|
||||||
|
|
||||||
# check existence of files
|
|
||||||
if ! [[ -f "tests/help.sh" ]]; then
|
|
||||||
error "Cannot open test files!"
|
|
||||||
fi
|
|
||||||
cd "tests"
|
|
||||||
files=(*.sh)
|
|
||||||
|
|
||||||
# locate orcli and OpenRefine
|
# locate orcli and OpenRefine
|
||||||
scriptpath=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
scriptpath=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
||||||
if [[ -x "${scriptpath}/refine" ]]; then
|
if [[ -x "${scriptpath}/refine" ]]; then
|
||||||
|
@ -1058,6 +1051,13 @@ orcli_test_command() {
|
||||||
error "OpenRefine's startup script (refine) not found!" "Did you put orcli in your OpenRefine app dir?"
|
error "OpenRefine's startup script (refine) not found!" "Did you put orcli in your OpenRefine app dir?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check existence of files
|
||||||
|
if ! [[ -f "tests/help.sh" ]]; then
|
||||||
|
error "Cannot open test files!"
|
||||||
|
fi
|
||||||
|
cd "tests"
|
||||||
|
files=(*.sh)
|
||||||
|
|
||||||
# create tmp directory
|
# create tmp directory
|
||||||
OPENREFINE_TMPDIR="$(mktemp -d)"
|
OPENREFINE_TMPDIR="$(mktemp -d)"
|
||||||
trap '{ rm -rf "$OPENREFINE_TMPDIR"; }' 0 2 3 15
|
trap '{ rm -rf "$OPENREFINE_TMPDIR"; }' 0 2 3 15
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
# shellcheck shell=bash disable=SC2154
|
# shellcheck shell=bash disable=SC2154
|
||||||
|
|
||||||
# check existence of files
|
|
||||||
if ! [[ -f "tests/help.sh" ]]; then
|
|
||||||
error "Cannot open test files!"
|
|
||||||
fi
|
|
||||||
cd "tests"
|
|
||||||
files=(*.sh)
|
|
||||||
|
|
||||||
# locate orcli and OpenRefine
|
# locate orcli and OpenRefine
|
||||||
scriptpath=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
scriptpath=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
||||||
if [[ -x "${scriptpath}/refine" ]]; then
|
if [[ -x "${scriptpath}/refine" ]]; then
|
||||||
|
@ -15,6 +8,13 @@ else
|
||||||
error "OpenRefine's startup script (refine) not found!" "Did you put orcli in your OpenRefine app dir?"
|
error "OpenRefine's startup script (refine) not found!" "Did you put orcli in your OpenRefine app dir?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check existence of files
|
||||||
|
if ! [[ -f "tests/help.sh" ]]; then
|
||||||
|
error "Cannot open test files!"
|
||||||
|
fi
|
||||||
|
cd "tests"
|
||||||
|
files=(*.sh)
|
||||||
|
|
||||||
# create tmp directory
|
# create tmp directory
|
||||||
OPENREFINE_TMPDIR="$(mktemp -d)"
|
OPENREFINE_TMPDIR="$(mktemp -d)"
|
||||||
trap '{ rm -rf "$OPENREFINE_TMPDIR"; }' 0 2 3 15
|
trap '{ rm -rf "$OPENREFINE_TMPDIR"; }' 0 2 3 15
|
||||||
|
|
Loading…
Reference in New Issue