Thread (131 messages) 131 messages, 6 authors, 2021-05-13

[PATCH 14/16] test-lib-functions: use "return 1" instead of "false"

STALE1971d

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-04-12 11:09:41
Subsystem: the rest · Maintainer: Linus Torvalds

Change a few functions that relied on a "false" being the last
statement in the function to use an explicit "return 1" like the other
functions in this file.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 t/test-lib-functions.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 2518a9b8274..c46bf0ff09c 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -763,7 +763,7 @@ test_path_is_file () {
 	if ! test -f "$1"
 	then
 		echo "File $1 doesn't exist"
-		false
+		return 1
 	fi
 }
 
@@ -772,7 +772,7 @@ test_path_is_dir () {
 	if ! test -d "$1"
 	then
 		echo "Directory $1 doesn't exist"
-		false
+		return 1
 	fi
 }
 
@@ -781,7 +781,7 @@ test_path_exists () {
 	if ! test -e "$1"
 	then
 		echo "Path $1 doesn't exist"
-		false
+		return 1
 	fi
 }
 
@@ -803,7 +803,7 @@ test_file_not_empty () {
 	if ! test -s "$1"
 	then
 		echo "'$1' is not a non-empty file."
-		false
+		return 1
 	fi
 }
 
-- 
2.31.1.634.gb41287a30b0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help