mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
+github.com/dduan/tre (#418)
* +github.com/dduan/tre a clone of unix tree(1) command written in rust * remove tree from `provides` tree usually refers to https://gitlab.com/OldManProgrammer/unix-tree let's not confuse the users * simplify tests * update fixture * simplify tests because the sorting of tre output is non-stable and can't be forced, we need to get rid of verbatim fixture comparison in tests
This commit is contained in:
parent
7bd881bbbc
commit
3aef1cf21b
36
projects/github.com/dduan/tre/package.yml
Normal file
36
projects/github.com/dduan/tre/package.yml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/dduan/tre/archive/refs/tags/v{{ version }}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/tre
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: dduan/tre/tags
|
||||||
|
strip: /v/
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
zlib.net: ^1
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
rust-lang.org: '>=1.60'
|
||||||
|
rust-lang.org/cargo: '*'
|
||||||
|
script: |
|
||||||
|
cargo install --locked --path . --root {{prefix}}
|
||||||
|
|
||||||
|
test:
|
||||||
|
script: |
|
||||||
|
# prepare for tests
|
||||||
|
mkdir -p foo/bar
|
||||||
|
mkdir -p foo/buzz
|
||||||
|
touch foo/buzz/lupus.txt
|
||||||
|
|
||||||
|
# run tests
|
||||||
|
test "$(tre --version)"='tre-command {{version}}'
|
||||||
|
out="$(tre . --all)"
|
||||||
|
echo $out | grep lupus.txt # test for files found
|
||||||
|
echo $out | grep bar # test for level 2 dirs found
|
||||||
|
echo $out | grep buzz # ^
|
||||||
|
tre --all
|
||||||
|
|
Loading…
Reference in a new issue