httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William McKee <will...@knowmad.com>
Subject t_cmp oddities
Date Thu, 08 Apr 2004 14:23:54 GMT
Hi Stas,

I've encountered an anomaly in t_cmp which seems to run against the
documented behavior. The easiest way to describe it is with an example.

In my response handler, I have the following two tests:

  ok t_cmp (
          undef,
          &get_undef,
          "Retrieve undef from subroutine"
          );
  my $rv = &get_undef;
  ok t_cmp (
          undef,
          $rv,
          "Retrieve undef from subroutine - use variable for comparison"
          );

  sub get_undef {
    return;
  }


Here's the output:

  # expected: undef
  # received: Retrieve undef from subroutine
  not ok 1
  # testing : Retrieve undef from subroutine - use variable for comparison
  # expected: undef
  # received: undef
  ok 2


As you can see, the first version tries to compare the description
instead of the undef value returned from the function. Do you see
similar behavior or have I hit another problem with my environment?


Thanks,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Mime
View raw message