From 0a03afe36ffbf5b1b1a5ccafae868e79a5f46385 Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Fri, 24 Mar 2017 12:22:09 +0000 Subject: [PATCH] Fix pattern matching when arguments contain '*' Because: * If the arguments string includes an '*' (asterisk) character then the bats-mock stub appears to fail to recognise the call. This change: * Quotes the `$pattern` in the arguments case comparison as this appears to resolve the issue. --- binstub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binstub b/binstub index d1169a2..ccda0bf 100755 --- a/binstub +++ b/binstub @@ -59,7 +59,7 @@ while IFS= read -r line; do argument="${arguments[$i]}" case "$argument" in - $pattern ) ;; + "$pattern" ) ;; * ) result=1 ;; esac done