#!perl -w

use strict;
use Test::More;
plan tests => 9;

use Data::Pretty qw(dump);

my $DOTS = "." x 20;

is(dump({}), "{}");
is(dump({ a => 1}), "{ a => 1 }");
is(dump({ 1 => 1}), "{ 1 => 1 }");
is(dump({strict => 1, shift => 2, abc => 3, -f => 4 }),
    "{ -f => 4, abc => 3, shift => 2, strict => 1 }");
is(dump({supercalifragilisticexpialidocious => 1, a => 2}),
    "{ a => 2, supercalifragilisticexpialidocious => 1 }");
is(dump({supercalifragilisticexpialidocious => 1, a => 2, b => $DOTS})."\n", <<EOT);
{
  a => 2,
  b => "$DOTS",
  supercalifragilisticexpialidocious => 1,
}
EOT
is(dump({aa => 1, B => 2}), "{ aa => 1, B => 2 }");
is(dump({a => 1, bar => $DOTS, baz => $DOTS, foo => 2 })."\n", <<EOT);
{
  a => 1,
  bar => "$DOTS",
  baz => "$DOTS",
  foo => 2,
}
EOT
is(dump({a => 1, "b-z" => 2}), qq({ "a" => 1, "b-z" => 2 }));
