diff options
Diffstat (limited to 't/chainlint/function.test')
-rw-r--r-- | t/chainlint/function.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/chainlint/function.test b/t/chainlint/function.test new file mode 100644 index 0000000..5ee5956 --- /dev/null +++ b/t/chainlint/function.test @@ -0,0 +1,13 @@ +# LINT: "()" in function definition not mistaken for subshell +sha1_file() { + echo "$*" | sed "s#..#.git/objects/&/#" +} && + +# LINT: broken &&-chain in function and after function +remove_object() { + file=$(sha1_file "$*") && + test -e "$file" + rm -f "$file" +} + +sha1_file arg && remove_object arg |