develooper Front page | perl.perl5.changes | Postings from April 2023

[Perl/perl5] a6136d: t/harness: avoid brace expansion for -dumptests

From:
"Craig A. Berry" via perl5-changes
Date:
April 16, 2023 18:06
Subject:
[Perl/perl5] a6136d: t/harness: avoid brace expansion for -dumptests
Message ID:
Perl/perl5/push/refs/heads/craigb/avoid_brace_expansion/000000-a6136d@github.com
  Branch: refs/heads/craigb/avoid_brace_expansion
  Home:   https://github.com/Perl/perl5
  Commit: a6136d48309b1fcc8b15974314ad88b0f771efae
      https://github.com/Perl/perl5/commit/a6136d48309b1fcc8b15974314ad88b0f771efae
  Author: Craig A. Berry <craigberry@mac.com>
  Date:   2023-04-16 (Sun, 16 Apr 2023)

  Changed paths:
    M t/harness

  Log Message:
  -----------
  t/harness: avoid brace expansion for -dumptests

Brace expansion is not available in a POSIX shell, is handled
slightly differently by the shells that do support it, and is
unlikely to work when the underlying implementation for Perl's
glob() function is not a Unix shell.  So instead of doing:

    {foo,bar,baz}/*.t

just accumulate the results of simpler glob operations:

    foo/*.t
    bar/*.t
    baz/*.t

This also allows us to dispense with the recursive function
_extract_tests() and its fancy dispatch based on reference type;
we would only ever be calling it with a simple string argument,
so we might as well just call glob() directly.





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About