summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-11-28 12:04:32 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-11-28 12:04:50 -0800
commit2a7f6ffb9168c2e0d1f4ca9c1b63357e431093e9 (patch)
tree6f857fe670e7c1c6cfd434233e884ab15cb1d9da /t
parentcompletion: add options --single-branch and --branch to "git clone" (diff)
parentgit p4: RCS expansion should not span newlines (diff)
downloadtgif-2a7f6ffb9168c2e0d1f4ca9c1b63357e431093e9.tar.xz
Merge branch 'pw/maint-p4-rcs-expansion-newline' into maint
"git p4" used to try expanding malformed "$keyword$" that spans across multiple lines. * pw/maint-p4-rcs-expansion-newline: git p4: RCS expansion should not span newlines
Diffstat (limited to 't')
-rwxr-xr-xt/t9810-git-p4-rcs.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t9810-git-p4-rcs.sh b/t/t9810-git-p4-rcs.sh
index fe30ad881f..0c2fc3ea1a 100755
--- a/t/t9810-git-p4-rcs.sh
+++ b/t/t9810-git-p4-rcs.sh
@@ -155,6 +155,25 @@ test_expect_success 'cleanup after failure' '
)
'
+# perl $File:: bug check
+test_expect_success 'ktext expansion should not expand multi-line $File::' '
+ (
+ cd "$cli" &&
+ cat >lv.pm <<-\EOF
+ my $wanted = sub { my $f = $File::Find::name;
+ if ( -f && $f =~ /foo/ ) {
+ EOF
+ p4 add -t ktext lv.pm &&
+ p4 submit -d "lv.pm"
+ ) &&
+ test_when_finished cleanup_git &&
+ git p4 clone --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ test_cmp "$cli/lv.pm" lv.pm
+ )
+'
+
#
# Do not scrub anything but +k or +ko files. Sneak a change into
# the cli file so that submit will get a conflict. Make sure that