2022-11-30 23:49:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-12-03 01:30:01 +01:00
|
|
|
t="import-csv"
|
2022-11-30 23:49:54 +01:00
|
|
|
|
2022-12-03 01:30:01 +01:00
|
|
|
# environment
|
|
|
|
tmpdir="$(mktemp -d)"
|
|
|
|
trap '{ rm -rf "${tmpdir}"; }' 0 2 3 15
|
|
|
|
cp data/example.csv "${tmpdir}"/${t}.csv
|
|
|
|
cp data/example.tsv "${tmpdir}"/${t}.assert
|
|
|
|
cd "${tmpdir}" || exit 1
|
2022-11-30 23:49:54 +01:00
|
|
|
|
|
|
|
# action
|
2022-12-01 23:43:52 +01:00
|
|
|
orcli import csv "${t}.csv"
|
|
|
|
orcli export tsv "${t} csv" --output "${t}.output"
|
2022-11-30 23:49:54 +01:00
|
|
|
|
|
|
|
# test
|
2022-12-03 01:30:01 +01:00
|
|
|
diff -u "${t}.assert" "${t}.output"
|