summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/path/astar/test/test_astar.pl
diff options
context:
space:
mode:
Diffstat (limited to 'digital/avr/modules/path/astar/test/test_astar.pl')
-rw-r--r--digital/avr/modules/path/astar/test/test_astar.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/digital/avr/modules/path/astar/test/test_astar.pl b/digital/avr/modules/path/astar/test/test_astar.pl
new file mode 100644
index 00000000..88fcc984
--- /dev/null
+++ b/digital/avr/modules/path/astar/test/test_astar.pl
@@ -0,0 +1,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";
+}