summaryrefslogtreecommitdiff
path: root/t/t1020-subdirectory.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1020-subdirectory.sh')
-rwxr-xr-xt/t1020-subdirectory.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index c2df75e495..9fdbb2af80 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -11,9 +11,9 @@ test_description='Try various core-level commands in subdirectory.
test_expect_success setup '
long="a b c d e f g h i j k l m n o p q r s t u v w x y z" &&
- for c in $long; do echo $c; done >one &&
+ test_write_lines $long >one &&
mkdir dir &&
- for c in x y z $long a b c; do echo $c; done >dir/two &&
+ test_write_lines x y z $long a b c >dir/two &&
cp one original.one &&
cp dir/two original.two
'
@@ -22,7 +22,7 @@ test_expect_success 'update-index and ls-files' '
git update-index --add one &&
case "$(git ls-files)" in
one) echo pass one ;;
- *) echo bad one; exit 1 ;;
+ *) echo bad one; return 1 ;;
esac &&
(
cd dir &&
@@ -34,7 +34,7 @@ test_expect_success 'update-index and ls-files' '
) &&
case "$(git ls-files)" in
dir/two"$LF"one) echo pass both ;;
- *) echo bad; exit 1 ;;
+ *) echo bad; return 1 ;;
esac
'
@@ -57,7 +57,7 @@ test_expect_success 'diff-files' '
echo d >>dir/two &&
case "$(git diff-files --name-only)" in
dir/two"$LF"one) echo pass top ;;
- *) echo bad top; exit 1 ;;
+ *) echo bad top; return 1 ;;
esac &&
# diff should not omit leading paths
(