diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-09-30 03:25:41 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-01 17:35:22 -0400 |
commit | c91f7e14f11795d3c077182b6d475990b288f35a (patch) | |
tree | f7d37e02b3b5763a5a5742726d48533ec83fe054 /test/test-common.sh | |
parent | 4014f6c2cc579645aac56f51aa6063db7815c3a8 (diff) |
test: Add globfile() to make it easy to check if a file matching a glob exists
Diffstat (limited to 'test/test-common.sh')
-rwxr-xr-x | test/test-common.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test-common.sh b/test/test-common.sh index 64ff660..81c8557 100755 --- a/test/test-common.sh +++ b/test/test-common.sh @@ -112,3 +112,7 @@ equals() { IFS= read -rd '' stdin || : [[ $1 == "$stdin" ]] } + +globfile() { + [[ -f $1 ]] +} |