use strict;
use warnings;
use Test::More;
use YAML::XS;
use Data::Dumper;

my $xs = YAML::XS->new;

my $circle = [ 'x' ];
$circle->[1] = $circle;

my $yaml = $xs->dump($circle);
my $exp = <<'EOM';
--- &1
- x
- *1
EOM
is $yaml, $exp, 'circular refs are dumped correctly';

done_testing;
