summaryrefslogtreecommitdiff
path: root/t/t0021-conversion.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t0021-conversion.sh')
-rwxr-xr-xt/t0021-conversion.sh60
1 files changed, 30 insertions, 30 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 33dfc9cd56..bad37abad2 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -76,13 +76,13 @@ test_expect_success setup '
git config filter.rot13.clean ./rot13.sh &&
{
- echo "*.t filter=rot13"
+ echo "*.t filter=rot13" &&
echo "*.i ident"
} >.gitattributes &&
{
- echo a b c d e f g h i j k l m
- echo n o p q r s t u v w x y z
+ echo a b c d e f g h i j k l m &&
+ echo n o p q r s t u v w x y z &&
echo '\''$Id$'\''
} >test &&
cat test >test.t &&
@@ -118,17 +118,17 @@ test_expect_success check '
# If an expanded ident ever gets into the repository, we want to make sure that
# it is collapsed before being expanded again on checkout
test_expect_success expanded_in_repo '
- {
- echo "File with expanded keywords"
- echo "\$Id\$"
- echo "\$Id:\$"
- echo "\$Id: 0000000000000000000000000000000000000000 \$"
- echo "\$Id: NoSpaceAtEnd\$"
- echo "\$Id:NoSpaceAtFront \$"
- echo "\$Id:NoSpaceAtEitherEnd\$"
- echo "\$Id: NoTerminatingSymbol"
- echo "\$Id: Foreign Commit With Spaces \$"
- } >expanded-keywords.0 &&
+ cat >expanded-keywords.0 <<-\EOF &&
+ File with expanded keywords
+ $Id$
+ $Id:$
+ $Id: 0000000000000000000000000000000000000000 $
+ $Id: NoSpaceAtEnd$
+ $Id:NoSpaceAtFront $
+ $Id:NoSpaceAtEitherEnd$
+ $Id: NoTerminatingSymbol
+ $Id: Foreign Commit With Spaces $
+ EOF
{
cat expanded-keywords.0 &&
@@ -139,17 +139,17 @@ test_expect_success expanded_in_repo '
git commit -m "File with keywords expanded" &&
id=$(git rev-parse --verify :expanded-keywords) &&
- {
- echo "File with expanded keywords"
- echo "\$Id: $id \$"
- echo "\$Id: $id \$"
- echo "\$Id: $id \$"
- echo "\$Id: $id \$"
- echo "\$Id: $id \$"
- echo "\$Id: $id \$"
- echo "\$Id: NoTerminatingSymbol"
- echo "\$Id: Foreign Commit With Spaces \$"
- } >expected-output.0 &&
+ cat >expected-output.0 <<-EOF &&
+ File with expanded keywords
+ \$Id: $id \$
+ \$Id: $id \$
+ \$Id: $id \$
+ \$Id: $id \$
+ \$Id: $id \$
+ \$Id: $id \$
+ \$Id: NoTerminatingSymbol
+ \$Id: Foreign Commit With Spaces \$
+ EOF
{
cat expected-output.0 &&
printf "\$Id: NoTerminatingSymbolAtEOF"
@@ -159,7 +159,7 @@ test_expect_success expanded_in_repo '
printf "\$Id: NoTerminatingSymbolAtEOF"
} >expected-output-crlf &&
{
- echo "expanded-keywords ident"
+ echo "expanded-keywords ident" &&
echo "expanded-keywords-crlf ident text eol=crlf"
} >>.gitattributes &&
@@ -285,7 +285,7 @@ test_expect_success 'required filter with absent smudge field' '
test_expect_success 'filtering large input to small output should use little memory' '
test_config filter.devnull.clean "cat >/dev/null" &&
test_config filter.devnull.required true &&
- for i in $(test_seq 1 30); do printf "%1048576d" 1; done >30MB &&
+ for i in $(test_seq 1 30); do printf "%1048576d" 1 || return 1; done >30MB &&
echo "30MB filter=devnull" >.gitattributes &&
GIT_MMAP_LIMIT=1m GIT_ALLOC_LIMIT=1m git add 30MB
'
@@ -303,7 +303,7 @@ test_expect_success 'filter that does not read is fine' '
test_expect_success EXPENSIVE 'filter large file' '
test_config filter.largefile.smudge cat &&
test_config filter.largefile.clean cat &&
- for i in $(test_seq 1 2048); do printf "%1048576d" 1; done >2GB &&
+ for i in $(test_seq 1 2048); do printf "%1048576d" 1 || return 1; done >2GB &&
echo "2GB filter=largefile" >.gitattributes &&
git add 2GB 2>err &&
test_must_be_empty err &&
@@ -643,7 +643,7 @@ test_expect_success PERL 'required process filter should process multiple packet
for FILE in "$TEST_ROOT"/*.file
do
cp "$FILE" . &&
- rot13.sh <"$FILE" >"$FILE.rot13"
+ rot13.sh <"$FILE" >"$FILE.rot13" || return 1
done &&
echo "*.file filter=protocol" >.gitattributes &&
@@ -682,7 +682,7 @@ test_expect_success PERL 'required process filter should process multiple packet
for FILE in *.file
do
- test_cmp_committed_rot13 "$TEST_ROOT/$FILE" $FILE
+ test_cmp_committed_rot13 "$TEST_ROOT/$FILE" $FILE || return 1
done
)
'