]> git.donarmstrong.com Git - debhelper.git/blobdiff - t/buildsystems/buildsystem_tests
New short switches for buildsystem stuff, drop envvars
[debhelper.git] / t / buildsystems / buildsystem_tests
index 27d7b943c7cb9cc08b4dddaa373d401be736c188..031828b7bcc28f38a48d04b55d81da6eedad0cb8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use Test::More tests => 224;
+use Test::More tests => 227;
 
 use strict;
 use warnings;
@@ -63,12 +63,15 @@ is( $BS_CLASS->_canonpath("path/to/../forward/../../somewhere"),
     "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 {
@@ -350,16 +353,16 @@ if (defined \$bs) {
 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" );
 
@@ -371,11 +374,11 @@ sub dh_auto_do_autoconf {
 
        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;
        }