summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Maischein <corion@corion.net>2012-02-19 21:07:02 +0100
committerMax Maischein <corion@corion.net>2012-02-19 21:11:57 +0100
commitef8da350e66b3a4c221f69d7c048f5781dfe1f56 (patch)
tree1515d45229c7f5841fe1b9ce5b2646389701f1ee
parentfed9e2bd224b024818ae1d663de291aa60c684cc (diff)
downloadperl-ef8da350e66b3a4c221f69d7c048f5781dfe1f56.tar.gz
Make t/porting/authors.t work on Windows
The Windows shell cmd.exe does not know about single quotes. Double quotes are the only thing available here. This patch selects the kind of quote to use based on the operating system and constructs the pipeline accordingly.
-rw-r--r--t/porting/authors.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/porting/authors.t b/t/porting/authors.t
index 6685468ef7..9b9ba7c80d 100644
--- a/t/porting/authors.t
+++ b/t/porting/authors.t
@@ -11,6 +11,7 @@ require 't/test.pl';
find_git_or_skip('all');
# This is the subset of "pretty=fuller" that checkAUTHORS.pl actually needs:
-system("git log --pretty=format:'Author: %an <%ae>%n' | $^X Porting/checkAUTHORS.pl --tap -");
+my $quote = $^O =~ /^mswin/i ? q(") : q(');
+system("git log --pretty=format:${quote}Author: %an <%ae>%n${quote} | $^X Porting/checkAUTHORS.pl --tap -");
# EOF