Update of /cvsroot/fink/fink/t/Config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11760/t/Config
Modified Files:
Tag: dist-up-branch
ChangeLog exports.t
Added Files:
Tag: dist-up-branch
flag.t
Log Message:
synced up to dist-up-branch-5 (HEAD)
Ready for testing, phase 1 done. Also fixed selfupdate logic.
Index: exports.t
===================================================================
RCS file: /cvsroot/fink/fink/t/Config/exports.t,v
retrieving revision 1.1.28.1
retrieving revision 1.1.28.2
diff -u -d -r1.1.28.1 -r1.1.28.2
--- exports.t 17 May 2005 18:10:07 -0000 1.1.28.1
+++ exports.t 28 May 2005 23:28:26 -0000 1.1.28.2
@@ -35,7 +35,7 @@
::is( $debarch, 'darwin-'.Fink::Services::get_arch );
# need a buildpath() method
- ::is( $buildpath, $config->param_default("Buildpath", "$basepath/src") );
+ ::is( $buildpath, $config->param_default("Buildpath",
"$basepath/src/fink.build") );
::is( $distribution, $config->param('Distribution') );
}
--- NEW FILE: flag.t ---
#!/usr/bin/perl -w
use strict;
use Test::More 'no_plan';
# Write a config file
my $conffile = "fink.conf";
open CONF, ">$conffile" or die "Can't open: $!";
print CONF <<__HEADER;
Basepath: basepath
Distribution: 10.2-gcc3.3
Trees: who/cares
__HEADER
close CONF;
END { unlink $conffile }
use Fink::Config;
my $config;
$config = Fink::Config->new_with_path($conffile);
isa_ok( $config, 'Fink::Config' );
ok( ! $config->has_flag('foo'), "blank flags are cleared" );
$config->set_flag('foo');
ok( $config->has_flag('foo'), "flags can be set" );
$config->set_flag('bar');
ok( $config->has_flag('bar'), "multiple flags can be set" );
$config->set_flag('foo');
ok( $config->has_flag('foo'), "setting twice is ok" );
$config->clear_flag('foo');
ok( ! $config->has_flag('foo'), "flags can be cleared" );
$config->clear_flag('foo');
ok( ! $config->has_flag('foo'), "clearing twice is ok" );
$config->clear_flag('iggy');
ok( ! $config->has_flag('iggy'), "clearing nonexistent flag is ok" );
$config->set_flag('iggy');
$config->save();
$config = Fink::Config->new_with_path($conffile);
ok( !$config->has_flag('foo') && $config->has_flag('bar')
&& $config->has_flag('iggy'), "flags can be restored" );
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/t/Config/ChangeLog,v
retrieving revision 1.1.10.1
retrieving revision 1.1.10.2
diff -u -d -r1.1.10.1 -r1.1.10.2
--- ChangeLog 17 May 2005 18:10:06 -0000 1.1.10.1
+++ ChangeLog 28 May 2005 23:28:26 -0000 1.1.10.2
@@ -1,3 +1,8 @@
+2005-05-24 Dave Vasilevsky <[EMAIL PROTECTED]>
+
+ * exports.t: Use new default buildpath.
+ * flag.t: Test new flags capability.
+
2005-05-16 Daniel Macks <[EMAIL PROTECTED]>
* exports.t, verbosity_level.t: verbosity_level is now an object method
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits