-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test oneliner without double escaping dollar sign #356
base: master
Are you sure you want to change the base?
Conversation
LGTM. Technically it's wrong if the path to perl contains two dollar signs, moving it one line up would fix that unlikely edge-case. |
good point... was not considering it being an option, but you are right and I moved it above via db19381 |
Generally I favour this change. Unfortunately, the CI fail reveals a real problem: dmake has to double up its braces. If you want to unquote them, you'll need to reverse that too. I feel like |
And apparently VMS also does its own unique thing. Writing out a Makefile seems like the way to go. |
nice catch and this comes from the additional test using a hash I've added :-)
|
going to work on the |
c0319fa
to
74d9a09
Compare
On VMS, the Makefile needs to be called |
I see `makefile_name` helper from t/lib/MakeMaker/Test/Utils.pm, also going to use the `run` helper
let's wait for CI return
|
On Jul 22, 2020, at 11:13 AM, Nicolas R. ***@***.***> wrote:
I see `makefile_name` from t/lib/MakeMaker/Test/Utils.pm
Right, use that one in the tests and in MakeMaker itself use $self->{MAKEFILE}.
… On Wed, Jul 22, 2020 at 10:11 AM Leon Timmermans ***@***.***>
wrote:
> going to work on the Makefile solution
>
> On VMS, the Makefile needs to be called Descrip.MMS AFAIK. Possibly other
> operating systems have similar quirks.
________________________________________
Craig A. Berry
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
|
Fix Perl-Toolchain-Gang#355 Double escaping '$' for Makefile usage is fine, but we should not use such a syntax while testing and trying to run the oneliner output. We could consider unescpaing '$$', '{{', '}}'... (for dmake) but a cleaner solution is to test the oneliner in a Makefile itself.
|
||
sub Makefile_template { | ||
my ($RUN) = @_; | ||
my $NOECHO = '@'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not be correct on all platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed you are right. This is kind a of a chicken egg issue: producing Makefile to test code which generate Makefile..
What would be your preference?
- do we have some helpers we could use for this?
- skipping some distro for this test?
- going back to the unescape solution?
- other?
thanks for your valuable input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping and unescaping are not viable approaches. Probably the way to go here is to be making a sandbox dir, then minimal Makefile.PL
. Look in the XS tests for functions to make this easy.
Fix #355
Double escaping '$' for Makefile usage is fine, but
we should not use such a syntax while testing and trying
to run the oneliner output.
This change is 'unescaping' the '$$' to '$' so we can perform
some extra checks while using oneliner.
Otherwise as shown in this example a simple 'my $foo' test will fail.