summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/path/astar/test/test_astar.pl
blob: 88fcc9848392862da90e663931049b2f78b0a787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
use strict;
use warnings;

my @tests = (
    [ 'iX___',
      '_X_X_',
      '___Xg' ],
    [ '0X_4_',
      '1X3X5',
      '_2_X6' ],
    );

while (@tests)
{
    my @in = @{shift @tests};
    my @out = @{shift @tests};
    open OUT, "./test_astar.host @in|" or die;
    my @r = grep s{^// }{}, <OUT>;
    chomp @r;
    die unless "@r" eq "@out";
}