[MacPorts] #56626: test shellescaping fails

MacPorts noreply at macports.org
Thu Jun 7 13:19:23 UTC 2018


#56626: test shellescaping fails
------------------------+--------------------
 Reporter:  ryandesign  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  base        |    Version:  2.5.2
 Keywords:  tiger       |       Port:
------------------------+--------------------
 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.
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/56626>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list