HEX
Server: Apache
System: Linux server-674799.igrow.ws 5.14.0-611.30.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 11 06:42:00 EST 2026 x86_64
User: elrashedytravel (1025)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/.cpan/build/Test-Deep-1.204-0/t/scalar.t
use strict;
use warnings;
use lib 't/lib';

use Std;

{
  my $a = [];
  check_test(
    sub {
      cmp_deeply($a."", $a);
    },
    {
      actual_ok => 0,
      diag => <<EOM,
Compared reftype(\$data)
   got : undef
expect : 'ARRAY'
EOM
    },
    "stringified ref not eq"
  );

  check_test(
    sub {
      cmp_deeply(undef, "");
    },
    {
      actual_ok => 0,
      diag => <<EOM,
Compared \$data
   got : undef
expect : ''
EOM
    },
    "undef ne ''"
  );

  check_test(
    sub {
      cmp_deeply([$a."", ["b"]], [shallow($a), ["b"]]);
    },
    {
      actual_ok => 0,
      diag => <<EOM,
Compared \$data->[0]
   got : '$a'
expect : $a
EOM
    },
    "shallow not eq"
  );

  check_test(
    sub {
      cmp_deeply([$a, ["b"]], [shallow($a), ["a"]]);
    },
    {
      actual_ok => 0,
      diag => <<EOM,
Compared \$data->[1][0]
   got : 'b'
expect : 'a'
EOM
    },
    "deep after shallow not eq"
  );
}