[PATCH 3/6] test: avoid `options` variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It has a special meaning in zsh.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 t/annotate-tests.sh              | 10 +++++-----
 t/t4051-diff-function-context.sh |  4 ++--
 t/t9300-fast-import.sh           |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index f1b9a6ce4d..3b57d4dbb5 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -15,19 +15,19 @@ fi
 check_count () {
 	head= &&
 	file='file' &&
-	options= &&
+	args= &&
 	while :
 	do
 		case "$1" in
 		-h) head="$2"; shift; shift ;;
 		-f) file="$2"; shift; shift ;;
-		-L*) options="$options $(sanitize_L "$1")"; shift ;;
-		-*) options="$options $1"; shift ;;
+		-L*) args="$args $(sanitize_L "$1")"; shift ;;
+		-*) args="$args $1"; shift ;;
 		*) break ;;
 		esac
 	done &&
-	echo "$PROG $options $file $head" >&4 &&
-	$PROG $options $file $head >actual &&
+	echo "$PROG $args $file $head" >&4 &&
+	$PROG $args $file $head >actual &&
 	perl -e '
 		my %expect = (@ARGV);
 		my %count = map { $_ => 0 } keys %expect;
diff --git a/t/t4051-diff-function-context.sh b/t/t4051-diff-function-context.sh
index 725278ad19..3bf4f0b6b0 100755
--- a/t/t4051-diff-function-context.sh
+++ b/t/t4051-diff-function-context.sh
@@ -30,10 +30,10 @@ last_context_line () {
 check_diff () {
 	name=$1
 	desc=$2
-	options="-W $3"
+	args="-W $3"
 
 	test_expect_success "$desc" '
-		git diff $options "$name^" "$name" >"$name.diff"
+		git diff $args "$name^" "$name" >"$name.diff"
 	'
 
 	test_expect_success ' diff applies' '
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index aa55b41b9a..c30503870f 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -3222,7 +3222,7 @@ test_expect_success 'U: validate root delete result' '
 # fast-import process is still running using background_import_still_running
 # *after* evaluating the test conditions.
 background_import_then_checkpoint () {
-	options=$1
+	args=$1
 	input_file=$2
 
 	mkfifo V.input
@@ -3234,7 +3234,7 @@ background_import_then_checkpoint () {
 	rm V.output
 
 	(
-		git fast-import $options <&8 >&9 &
+		git fast-import $args <&8 >&9 &
 		echo $! >&9
 		wait $!
 		echo >&2 "background fast-import terminated too early with exit code $?"
-- 
2.39.2.13.g1fb56cf030




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux