Revision ec583449067bab5b800ecc63926f35c9dae96fa1 authored by Johannes Schindelin on 11 March 2023, 20:29:12 UTC, committed by Johannes Schindelin on 17 April 2023, 19:16:07 UTC
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent c96ecfe
Raw File
nested-loop-detect-failure.test
# LINT: neither loop handles failure explicitly with "|| return 1"
for i in 0 1 2 3 4 5 6 7 8 9;
do
	for j in 0 1 2 3 4 5 6 7 8 9;
	do
		echo "$i$j" >"path$i$j"
	done
done &&

# LINT: inner loop handles failure explicitly with "|| return 1"
for i in 0 1 2 3 4 5 6 7 8 9;
do
	for j in 0 1 2 3 4 5 6 7 8 9;
	do
		echo "$i$j" >"path$i$j" || return 1
	done
done &&

# LINT: outer loop handles failure explicitly with "|| return 1"
for i in 0 1 2 3 4 5 6 7 8 9;
do
	for j in 0 1 2 3 4 5 6 7 8 9;
	do
		echo "$i$j" >"path$i$j"
	done || return 1
done &&

# LINT: inner & outer loops handles failure explicitly with "|| return 1"
for i in 0 1 2 3 4 5 6 7 8 9;
do
	for j in 0 1 2 3 4 5 6 7 8 9;
	do
		echo "$i$j" >"path$i$j" || return 1
	done || return 1
done
back to top