httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William McKee <>
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 (
          "Retrieve undef from subroutine"
  my $rv = &get_undef;
  ok t_cmp (
          "Retrieve undef from subroutine - use variable for comparison"

  sub get_undef {

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?


Knowmad Services Inc.

View raw message