1#!/usr/bin/perl
2require SVN::Notify::Mirror;
3use Test::More tests => 12;
4
5sub shortest {
6    my ( $dirs, $expected ) = @_;
7
8    is(SVN::Notify::Mirror::_shortest_path(@$dirs), $expected);
9    is(SVN::Notify::Mirror::_shortest_path(reverse(@$dirs)), $expected);
10}
11
12shortest(['/foo/bar', '/foo/baz', '/foo/blargh'], '/foo');
13shortest(['/foo/bar', '/foo/bar'], '/foo');
14shortest(['/foo/bar'], '/foo');
15shortest(['/foo/bar/a', '/foo/bar/b', '/blar/blagh'], '');
16shortest(['/'], '');
17shortest(['', '/foo/bar', '', '/foo/baz'], '/foo');
18