Subject: Re: [PATCH v7 07/10] send-email: reduce dependencies impact on parse_address_line

From: Torsten Bögershausen <[email-masked]>
Date: Tue, 7 Jul 2015 11:37:47 +0200

#!/usr/bin/perl

Should we have hard-coded PATH to perl here ?

/usr/bin/perl --version
This is perl, v5.10.0 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

> +
> +my $is_passing = Test::More->builder->is_passing;
> +exit($is_passing ? 0 : 1);
> 

This seems to give problems:
debug=t verbose=t ./t9000-addresses.sh

Initialized empty Git repository in /Users/me/projects/git/git.pu/t/trash directory.t9000-addresses/.git/
# run 0: Perl address parsing function (perl /Users/me/projects/git/git.pu/t/t9000/test.pl)
ok 1 - use Git;
ok 2 - same output : Jane
ok 3 - same output : [email-masked]
ok 4 - same output : <[email-masked]>
ok 5 - same output : Jane <[email-masked]>
ok 6 - same output : Jane Doe <[email-masked]>
ok 7 - same output : "Jane" <[email-masked]>
ok 8 - same output : "Doe, Jane" <[email-masked]>
ok 9 - same output : "Jane@:;\>.,()<Doe" <[email-masked]>
ok 10 - same output : Jane!\#$%&'*+-/=?^_{|}~Doe' <[email-masked]>
ok 11 - same output : "<[email-masked]>"
ok 12 - same output : "Jane [email-masked]"
ok 13 - same output : Jane Doe <jdoe    @   example.com  >
ok 14 - same output : Jane       Doe <  [email-masked]  >
ok 15 - same output : Jane @ Doe @ Jane @ Doe
ok 16 - same output : "Jane, 'Doe'" <[email-masked]>
ok 17 - same output : 'Doe, "Jane' <[email-masked]>
ok 18 - same output : "Jane" "Do"e <[email-masked]>
ok 19 - same output : "Jane' Doe" <[email-masked]>
ok 20 - same output : "Jane Doe <[email-masked]>" <[email-masked]>
ok 21 - same output : "Jane\" Doe" <[email-masked]>
ok 22 - same output : Doe, jane <[email-masked]>
ok 23 - same output : "Jane Doe <[email-masked]>
ok 24 - same output : 'Jane 'Doe' <[email-masked]>
not ok 25 - same output : Jane\ Doe <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : Jane\ Doe <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = '"Jane \ Doe" <[email-masked]>'
#     $expected->[0] = '"Jane\ Doe" <[email-masked]>'
not ok 26 - same output : "Doe, Ja"ne <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : "Doe, Ja"ne <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = '"Doe, Ja" ne <[email-masked]>'
#     $expected->[0] = '"Doe, Ja ne" <[email-masked]>'
not ok 27 - same output : "Doe, Katarina" Jane <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : "Doe, Katarina" Jane <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = '"Doe, Katarina" Jane <[email-masked]>'
#     $expected->[0] = '"Doe, Katarina Jane" <[email-masked]>'
not ok 28 - same output : Jane@:;\.,()<>Doe <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : Jane@:;\.,()<>Doe <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[1] = '\.'
#     $expected->[1] = '"\."'
not ok 29 - same output : Jane [email-masked] # TODO known breakage
#   Failed (TODO) test 'same output : Jane [email-masked]'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = 'Jane'
#     $expected->[0] = [email-masked]'
not ok 30 - same output : <[email-masked]> Jane Doe # TODO known breakage
#   Failed (TODO) test 'same output : <[email-masked]> Jane Doe'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = 'Jane Doe <[email-masked]>'
#     $expected->[0] = [email-masked]'
not ok 31 - same output : Jane <[email-masked]> Doe # TODO known breakage
#   Failed (TODO) test 'same output : Jane <[email-masked]> Doe'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = 'Jane Doe <[email-masked]>'
#     $expected->[0] = 'Jane <[email-masked]>'
not ok 32 - same output : "Jane "Kat"a" ri"na" ",Doe" <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : "Jane "Kat"a" ri"na" ",Doe" <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = '"Jane " Kat "a" ri "na" ",Doe" <[email-masked]>'
#     $expected->[0] = '"Jane  Kat a ri na ,Doe" <[email-masked]>'
not ok 33 - same output : Jane Doe # TODO known breakage
#   Failed (TODO) test 'same output : Jane Doe'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = 'Jane'
#     $expected->[0] = 'Jane Doe'
not ok 34 - same output : Jane "Doe <[email-masked]>" # TODO known breakage
#   Failed (TODO) test 'same output : Jane "Doe <[email-masked]>"'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = 'Jane'
#     $expected->[0] = '"Jane Doe <[email-masked]>"'
not ok 35 - same output : \"Jane Doe <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : \"Jane Doe <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = '\ " Jane Doe <[email-masked]>'
#     $expected->[0] = '"\"Jane Doe" <[email-masked]>'
not ok 36 - same output : Jane\"\" Doe <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : Jane\"\" Doe <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = 'Jane \ " \ " Doe <[email-masked]>'
#     $expected->[0] = '"Jane\"\" Doe" <[email-masked]>'
not ok 37 - same output : 'Jane "Katarina\" \' Doe' <[email-masked]> # TODO known breakage
#   Failed (TODO) test 'same output : 'Jane "Katarina\" \' Doe' <[email-masked]>'
#   at /Users/me/projects/git/git.pu/t/t9000/test.pl line 62.
#     Structures begin differing at:
#          $got->[0] = ''Jane " Katarina \ " \ ' Doe' <[email-masked]>'
#     $expected->[0] = '"'Jane  Katarina\" \' Doe'" <[email-masked]>'
1..37
# test_external test Perl address parsing function failed: perl /Users/me/projects/git/git.pu/t/t9000/test.pl
# expecting no stderr from previous command
# test_external_without_stderr test no stderr: Perl address parsing function failed: perl /Users/me/projects/git/git.pu/t/t9000/test.pl: 
# Stderr is:
Can't locate object method "is_passing" via package "Test::Builder" at /Users/me/projects/git/git.pu/t/t9000/test.pl line 66.
# Looks like your test died just after 37.