#!/usr/bin/perl
-use Test::More tests => 224;
+use Test::More tests => 227;
use strict;
use warnings;
"somewhere","_canonpath no2" );
is( $BS_CLASS->_canonpath("path/to/../../../somewhere"),
"../somewhere","_canonpath no3" );
+is( $BS_CLASS->_canonpath("./"), ".", "_canonpath no4" );
is( $BS_CLASS->_rel2rel("path/my/file", "path/my"),
"file", "_rel2rel no1" );
is( $BS_CLASS->_rel2rel("path/dir/file", "path/my"),
"../dir/file", "_rel2rel no2" );
is( $BS_CLASS->_rel2rel("file", "/root/path/my", "/root"),
"../../file", "_rel2rel no3" );
+is( $BS_CLASS->_rel2rel(".", "."), ".", "_rel2rel no4" );
+is( $BS_CLASS->_rel2rel("path", "path/"), ".", "_rel2rel no5" );
### Test Buildsystem class path API methods under different configurations
sub test_buildsystem_paths_api {
EOF
}
-is_deeply( process_stdout("DH_AUTO_OPTIONS='--builddirectory=autoconf/bld\\ dir --sourcedirectory autoconf' $^X -- -",
+is_deeply( process_stdout("$^X -- - --builddirectory='autoconf/bld dir' --sourcedirectory autoconf",
get_load_bs_source(undef, "configure")),
[ 'NAME=autoconf', 'builddir=autoconf/bld dir', 'makecmd=make', 'sourcedir=autoconf' ],
- "dh_auto_options w/space, autoconf autoselection and sourcedir/builddir" );
+ "autoconf autoselection and sourcedir/builddir" );
-is_deeply( process_stdout("$^X -- - -cautoconf -d autoconf", get_load_bs_source("autoconf", "build")),
+is_deeply( process_stdout("$^X -- - -Sautoconf -D autoconf", get_load_bs_source("autoconf", "build")),
[ 'NAME=autoconf', 'builddir=undef', 'makecmd=make', 'sourcedir=autoconf' ],
"forced autoconf and sourcedir" );
-is_deeply( process_stdout("$^X -- - -b -cautoconf", get_load_bs_source("autoconf", "build")),
+is_deeply( process_stdout("$^X -- - -B -Sautoconf", get_load_bs_source("autoconf", "build")),
[ 'NAME=autoconf', "builddir=$default_builddir", 'makecmd=make', 'sourcedir=.' ],
"forced autoconf and default build directory" );
my (@lines, @extra_args);
my $buildpath = $sourcedir;
- my @dh_auto_args = ("-d", $sourcedir);
- my $dh_auto_str = "-d $sourcedir";
+ my @dh_auto_args = ("-D", $sourcedir);
+ my $dh_auto_str = "-D $sourcedir";
if ($builddir) {
- push @dh_auto_args, "-b", $builddir;
- $dh_auto_str .= " -b $builddir";
+ push @dh_auto_args, "-B", $builddir;
+ $dh_auto_str .= " -B $builddir";
$buildpath = $builddir;
}