Remove auto-generated files from git.
[gnu-stow.git] / t / relative_path.t
blob7269b7dbf40fa861b8637fbd2a56c59f24d0d10b
1 #!/usr/local/bin/perl
4 # Testing relative_path();
7 # load as a library
8 BEGIN { use lib qw(. ..); require "stow"; }
10 use Test::More tests => 5;
12 is(
13 relative_path('a/b/c', 'a/b/d'),
14 '../d',
15 => 'diferent branches'
18 is(
19 relative_path('/a/b/c', '/a/b/c/d'),
20 'd',
21 => 'lower same branch'
24 is(
25 relative_path('a/b/c', 'a/b'),
26 '..',
27 => 'higher, same branch'
30 is(
31 relative_path('/a/b/c', '/d/e/f'),
32 '../../../d/e/f',
33 => 'common parent is /'
36 is(
37 relative_path('///a//b//c////', '/a////b/c/d////'),
38 'd',
39 => 'extra /\'s '