mirror of https://github.com/deadc0de6/catcli
remove compare
parent
c318a62941
commit
8ed43d5262
@ -1,5 +0,0 @@
|
||||
"github","storage","","2380","2023-03-08 20:58:18","","","2","23343173632","245107195904",""
|
||||
"workflows","dir","github/workflows","1190","2023-03-08 20:58:18","2023-03-02 10:15:30","","2","","",""
|
||||
"pypi-release.yml","file","github/workflows/pypi-release.yml","691","2023-03-08 20:58:18","2022-10-19 21:00:37","57699a7a6a03e20e864f220e19f8e197","","","",""
|
||||
"testing.yml","file","github/workflows/testing.yml","595","2023-03-08 20:58:18","2023-03-02 10:15:30","f4f4bc5acb9deae488b55f0c9c507120","","","",""
|
||||
"FUNDING.yml","file","github/FUNDING.yml","17","2023-03-08 20:58:18","2022-10-19 21:00:37","0c6407a84d412c514007313fb3bca4de","","","",""
|
@ -1,61 +0,0 @@
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attr": "",
|
||||
"children": [
|
||||
{
|
||||
"maccess": 1666206037.0786593,
|
||||
"md5": "0c6407a84d412c514007313fb3bca4de",
|
||||
"name": "FUNDING.yml",
|
||||
"relpath": "/FUNDING.yml",
|
||||
"size": 17,
|
||||
"type": "file"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"maccess": 1666206037.078865,
|
||||
"md5": "57699a7a6a03e20e864f220e19f8e197",
|
||||
"name": "pypi-release.yml",
|
||||
"relpath": "workflows/pypi-release.yml",
|
||||
"size": 691,
|
||||
"type": "file"
|
||||
},
|
||||
{
|
||||
"maccess": 1677748530.6920426,
|
||||
"md5": "f4f4bc5acb9deae488b55f0c9c507120",
|
||||
"name": "testing.yml",
|
||||
"relpath": "workflows/testing.yml",
|
||||
"size": 595,
|
||||
"type": "file"
|
||||
}
|
||||
],
|
||||
"maccess": 1677748530.691944,
|
||||
"md5": null,
|
||||
"name": "workflows",
|
||||
"relpath": "/workflows",
|
||||
"size": 1190,
|
||||
"type": "dir"
|
||||
}
|
||||
],
|
||||
"free": 23343173632,
|
||||
"name": "github",
|
||||
"size": 2380,
|
||||
"total": 245107195904,
|
||||
"ts": 1678305498,
|
||||
"type": "storage"
|
||||
},
|
||||
{
|
||||
"attr": {
|
||||
"access": 1678305498,
|
||||
"access_version": "0.8.7",
|
||||
"created": 1678305498,
|
||||
"created_version": "0.8.7"
|
||||
},
|
||||
"name": "meta",
|
||||
"type": "meta"
|
||||
}
|
||||
],
|
||||
"name": "top",
|
||||
"type": "top"
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# author: deadc0de6 (https://github.com/deadc0de6)
|
||||
# Copyright (c) 2023, deadc0de6
|
||||
|
||||
# exit on first error
|
||||
set -e
|
||||
|
||||
# get current path
|
||||
rl="readlink -f"
|
||||
if ! ${rl} "${0}" >/dev/null 2>&1; then
|
||||
rl="realpath"
|
||||
|
||||
if ! hash ${rl}; then
|
||||
echo "\"${rl}\" not found !" && exit 1
|
||||
fi
|
||||
fi
|
||||
cur=$(dirname "$(${rl} "${0}")")
|
||||
|
||||
# pivot
|
||||
prev="${cur}/.."
|
||||
cd "${prev}"
|
||||
|
||||
# coverage
|
||||
#export PYTHONPATH=".:${PYTHONPATH}"
|
||||
bin="python3 -m catcli.catcli"
|
||||
if hash coverage 2>/dev/null; then
|
||||
bin="coverage run -p --source=catcli -m catcli.catcli"
|
||||
#bin="coverage run -p --source=${prev}/catcli -m catcli.catcli"
|
||||
fi
|
||||
|
||||
echo "current dir: $(pwd)"
|
||||
echo "pythonpath: ${PYTHONPATH}"
|
||||
echo "bin: ${bin}"
|
||||
${bin} --version
|
||||
|
||||
# get the helpers
|
||||
# shellcheck source=tests-ng/helper
|
||||
source "${cur}"/helper
|
||||
echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sgr0)"
|
||||
|
||||
##########################################################
|
||||
# the test
|
||||
##########################################################
|
||||
|
||||
# create temp dirs
|
||||
tmpd=$(mktemp -d)
|
||||
clear_on_exit "${tmpd}"
|
||||
|
||||
catalog="${tmpd}/catalog"
|
||||
|
||||
# index
|
||||
${bin} -B index -c --catalog="${catalog}" github .github
|
||||
cat "${catalog}"
|
||||
|
||||
# make sure we still get the same output in native format
|
||||
native="${tmpd}/native.txt"
|
||||
${bin} -B ls -r -s --format=native --catalog="${catalog}" > "${native}"
|
||||
diff -I '^.*| totsize.*$' "${cur}/assets/github.catalog.native.txt" "${native}"
|
||||
|
||||
# make sure we still get the same output in csv
|
||||
csv="${tmpd}/csv.txt"
|
||||
${bin} -B ls -r -s --format=csv --catalog="${catalog}" > "${csv}"
|
||||
diff -I '^.*| totsize.*$' "${cur}/assets/github.catalog.csv.txt" "${csv}"
|
||||
|
||||
# the end
|
||||
echo "test \"$(basename "$0")\" success"
|
||||
cd "${cur}"
|
||||
exit 0
|
Loading…
Reference in New Issue