#!/perl -w
# NAME: reltest.pl
# AIM: Test my relative.pl module ... 
use strict;
use warnings;
use Cwd;
require 'relative.pl' or die "Unable to load relative.pl ...\n";
my $currdir = cwd();
print "Current directory: [$currdir]\n";
my $base_path = "C:\\GTools\\";
my $sln_path = "C:\\GTools\\tools\\bglview2\\";
my $fil_path = "C:\\GTools\\tools\\bglview2\\BvMath\\";
my $fil_path2 = "C:\\GTools\\utils\\";

my $rel_path = get_rel_dos_path($sln_path, $fil_path);
print "Rel Path: $rel_path (to ".sub_base($sln_path).", from ".sub_base($fil_path).")\n";
my $rel_path4 = get_rel_dos_path($fil_path, $sln_path );
print "Rel Path: $rel_path4 (to ".sub_base($fil_path).", from ".sub_base($sln_path).")\n";

my $rel_path2 = get_rel_dos_path($sln_path, $fil_path2);
print "Rel Path: $rel_path2 (to ".sub_base($sln_path).", from ".sub_base($fil_path2).")\n";
my $rel_path3 = get_rel_dos_path($fil_path2, $sln_path);
print "Rel Path: $rel_path3 (to ".sub_base($fil_path2).", from ".sub_base($sln_path).")\n";

sub sub_base {
	my ($pth) = shift;
	$pth = substr($pth,length($base_path));
	return $pth;
}

# eof - reltest.pl
