summaryrefslogtreecommitdiff
path: root/test/test-common.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-09-30 03:25:41 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-10-01 17:35:22 -0400
commitc91f7e14f11795d3c077182b6d475990b288f35a (patch)
treef7d37e02b3b5763a5a5742726d48533ec83fe054 /test/test-common.sh
parent4014f6c2cc579645aac56f51aa6063db7815c3a8 (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-xtest/test-common.sh4
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 ]]
+}