File: 2.ioall.t

package info (click to toggle)
libgraph-writer-graphviz-perl 0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 128 kB
  • sloc: perl: 136; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 377 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env perl -w

use strict;
use Test::Simple tests => 1;
use IO::All;
use Graph;
use Graph::Writer::GraphViz;

my @v = qw/Alice Bob Crude Dr/;
my $g = Graph->new;
$g->add_vertices(@v);

my $wr = Graph::Writer::GraphViz->new(-format => 'dot');
my $io = io('t/graph.ioall.dot')->mode('w+')->assert;
$wr->write_graph($g, $io );

ok(-f 't/graph.ioall.dot');

$io->unlink;