Skip to content

Commit 01730a3

Browse files
jmahlergitster
authored andcommitted
t9138-git-svn-authors-prog.sh fixups
Several fixups of the t9138-git-svn-authors-prog.sh test script to follow current recommendations in t/README. - Fixed a Perl script with a full "#!/usr/bin/perl" shebang to use write_script() and $PERL_PATH as per t/README. - Placed svn-authors data setup inside a test_expect_success. - Fixed trailing quotes to use the same indentation throughout. Signed-off-by: Jeremiah Mahler <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4a28f16 commit 01730a3

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

t/t9138-git-svn-authors-prog.sh

+17-18
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,39 @@ test_description='git svn authors prog tests'
77

88
. ./lib-git-svn.sh
99

10-
cat > svn-authors-prog <<'EOF'
11-
#!/usr/bin/perl
12-
$_ = shift;
13-
if (s/-sub$//) {
14-
print "$_ <$_\@sub.example.com>\n";
15-
}
16-
else {
17-
print "$_ <$_\@example.com>\n";
18-
}
10+
write_script svn-authors-prog "$PERL_PATH" <<-\EOF
11+
$_ = shift;
12+
if (s/-sub$//) {
13+
print "$_ <$_\@sub.example.com>\n";
14+
} else {
15+
print "$_ <$_\@example.com>\n";
16+
}
1917
EOF
20-
chmod +x svn-authors-prog
2118

22-
cat > svn-authors <<'EOF'
23-
ff = FFFFFFF FFFFFFF <[email protected]>
24-
EOF
19+
test_expect_success 'svn-authors setup' '
20+
cat >svn-authors <<-\EOF
21+
ff = FFFFFFF FFFFFFF <[email protected]>
22+
EOF
23+
'
2524

2625
test_expect_success 'setup svnrepo' '
2726
for i in aa bb cc-sub dd-sub ee-foo ff
2827
do
2928
svn mkdir -m $i --username $i "$svnrepo"/$i
3029
done
31-
'
30+
'
3231

3332
test_expect_success 'import authors with prog and file' '
3433
git svn clone --authors-prog=./svn-authors-prog \
3534
--authors-file=svn-authors "$svnrepo" x
36-
'
35+
'
3736

3837
test_expect_success 'imported 6 revisions successfully' '
3938
(
4039
cd x
4140
test "`git rev-list refs/remotes/git-svn | wc -l`" -eq 6
4241
)
43-
'
42+
'
4443

4544
test_expect_success 'authors-prog ran correctly' '
4645
(
@@ -56,15 +55,15 @@ test_expect_success 'authors-prog ran correctly' '
5655
git rev-list -1 --pretty=raw refs/remotes/git-svn~5 | \
5756
grep "^author aa <aa@example\.com> "
5857
)
59-
'
58+
'
6059

6160
test_expect_success 'authors-file overrode authors-prog' '
6261
(
6362
cd x
6463
git rev-list -1 --pretty=raw refs/remotes/git-svn | \
6564
grep "^author FFFFFFF FFFFFFF <fFf@other\.example\.com> "
6665
)
67-
'
66+
'
6867

6968
git --git-dir=x/.git config --unset svn.authorsfile
7069
git --git-dir=x/.git config --unset svn.authorsprog

0 commit comments

Comments
 (0)