Opened 6 years ago

Closed 4 years ago

#56626 closed defect (fixed)

test shellescaping fails

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: base Version: 2.5.2
Keywords: tiger legacy-os haspatch Cc:
Port:

Description

The shellescaping test fails on Tiger:

==== shellescaping Check whether shell escaping using macports::shellescape works correctly when passed to Pextlib's system extension. FAILED
==== Contents of test case:

    set first "yes"
    foreach test $shellescapeTests {
        if {$first eq "yes"} {
            system "echo [macports::shellescape $test]  >$outputfile"
            set first "no"
        } else {
            system "echo [macports::shellescape $test] >>$outputfile"
        }
    }

    set fd [open $outputfile r]
    set output [read -nonewline $fd]
    close $fd
    return $output

---- Result was:
using \\backslashes
 spaces 
and	tabs
quotes need to be "supported", too
… and not only 'double-quotes'
other meta chars such as $dollar,
!bang, ;semicolon, :colon,
$(subshells) and similar must be kept
>redirects <& must be ignored as well as ampersands &
---- Result should have been (exact matching):
using \backslashes
 spaces 
and	tabs
quotes need to be "supported", too
… and not only 'double-quotes'
other meta chars such as $dollar,
!bang, ;semicolon, :colon,
$(subshells) and similar must be kept
>redirects <& must be ignored as well as ampersands &
==== shellescaping FAILED

This is with:

$ /bin/bash --version
GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0)
Copyright (C) 2002 Free Software Foundation, Inc.

Change History (3)

comment:1 Changed 6 years ago by raimue (Rainer Müller)

Keywords: legacy-os added

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 62e0767bd2f700243be8053db6e16994669e3def/macports-base (master):

Fix shellescape to work on Tiger

Closes: #56626

Note: See TracTickets for help on using tickets.