Test::More with suexec

Discussion in 'Perl Misc' started by Nene, Sep 11, 2012.

  1. Nene

    Nene Guest

    I'm trying to create a test with Test::More.

    The command I"m issuing in the perl script is /usr/sbin/suexec -V, which will output:

    -D AP_DOC_ROOT="/home"
    -D AP_GID_MIN=500
    -D AP_HTTPD_USER="apache"
    -D AP_LOG_EXEC="/var/log/httpd/suexec_log"
    -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
    -D AP_UID_MIN=500
    -D AP_USERDIR_SUFFIX="Sites/default/htdocs"

    But my test is not working:

    #!/usr/bin/perl
    use warnings;
    use strict;

    use Test::More 'no_plan';

    like(`/usr/sbin/suexec -V`, qr/apache/, "suexec is configured");



    I"m getting:

    not ok 1 - suexec is configured
    # Failed test 'suexec is configured'
    # at ./x.t line 6.
    # ''
    # doesn't match '(?-xism:apache)'
    1..1
    # Looks like you failed 1 test of 1.

    Does anybody have a clue, I'm thinking it's the way suexec -V outputs is the culprit?
    Nene, Sep 11, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shess
    Replies:
    0
    Views:
    281
    shess
    Nov 24, 2003
  2. Michael
    Replies:
    4
    Views:
    397
    Matt Hammond
    Jun 26, 2006
  3. Skybuck Flying

    Call oddities: &Test() vs &Test vs Test

    Skybuck Flying, Oct 4, 2009, in forum: C Programming
    Replies:
    1
    Views:
    682
    Skybuck Flying
    Oct 4, 2009
  4. Robert Klemme

    With a Ruby Yell: more, more more!

    Robert Klemme, Sep 28, 2005, in forum: Ruby
    Replies:
    5
    Views:
    203
    Jeff Wood
    Sep 29, 2005
  5. Íéêüëáïò Êïýñáò

    Apache and suexec issue that wont let me run my python script

    Íéêüëáïò Êïýñáò, Jun 1, 2013, in forum: Python
    Replies:
    116
    Views:
    826
Loading...

Share This Page