File: basics.t

package info (click to toggle)
libdata-dump-oneline-perl 0.080-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 54; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 247 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!perl

use strict;
use warnings;

use Test::More 0.98;
use Data::Dump::OneLine;

is(dmp(1), 1);
is(dmp("a\nb"), q["a\\nb"]);

my $a = [1, 2]; $a->[2] = $a;
is(dmp($a), q[do{my$var=[1,2,'$var'];$var->[2]=$var;$var}], "arrayref 2");

done_testing;