[Aptitude-svn-commit] r3640 - in branches/aptitude-0.3/aptitude: . src/generic/problemresolver
Daniel Burrows
dburrows@costa.debian.org
Mon Jul 11 00:25:34 UTC 2005
Author: dburrows
Date: Mon Jul 11 00:25:31 2005
New Revision: 3640
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/problemresolver/test.cc
Log:
Disable dumping the world in the test code by default.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Mon Jul 11 00:25:31 2005
@@ -1,5 +1,10 @@
2005-07-10 Daniel Burrows <dburrows@debian.org>
+ * src/generic/problemresolver/test.cc:
+
+ Disable dumping the world in the test code by default, but let
+ the user enable it with --dump.
+
* doc/en/aptitude.xml:
Correct the documentation of the default binding of DumpResolver
Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/test.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/test.cc (original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/test.cc Mon Jul 11 00:25:31 2005
@@ -1123,7 +1123,7 @@
throw ParseError("Unexpected error reading solution list");
}
-void run_test_file(istream &f)
+void run_test_file(istream &f, bool show_world)
{
dummy_universe_ref universe=NULL;
@@ -1151,8 +1151,11 @@
universe=parse_universe(f);
- cout << "Input universe:" << endl;
- dump_universe(universe, cout);
+ if(show_world)
+ {
+ cout << "Input universe:" << endl;
+ dump_universe(universe, cout);
+ }
}
else if(s == "TEST")
{
@@ -1303,9 +1306,14 @@
int main(int argc, char **argv)
{
int rval=0;
+ bool show_world=false;
for(int i=1; i<argc; ++i)
{
+ // lame man's command line
+ if(!strcmp(argv[0], "--dump"))
+ show_world=true;
+
ifstream f(argv[i]);
if(!f)
@@ -1317,7 +1325,7 @@
try
{
f >> ws;
- run_test_file(f);
+ run_test_file(f, show_world);
}
catch(const Exception &e)
{
More information about the Aptitude-svn-commit
mailing list