Author: dmacvicar Date: Fri Aug 10 16:08:29 2007 New Revision: 6589 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6589&view=rev Log: two more tests fixed Modified: trunk/libzypp/zypp/Edition.cc Modified: trunk/libzypp/zypp/Edition.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Edition.cc?rev=6589&r1=6588&r2=6589&view=diff ============================================================================== --- trunk/libzypp/zypp/Edition.cc (original) +++ trunk/libzypp/zypp/Edition.cc Fri Aug 10 16:08:29 2007 @@ -150,27 +150,15 @@ //[0-9]+:)?([^-]*)(-([^-]*))?" ); str::smatch what; - std::cout << "edition: " << edition_r << std::endl; - - std::cout << str::regex_match( edition_r, what, _rxEdition ) << std::endl; - - std::cout << "size: " << what.size() << std::endl; - - for (int i = 1; i < 4; ++i) - std::cout << i << ": " << what[i] << std::endl; - - - if( str::regex_match( edition_r, what, _rxEdition )) + if( str::regex_match( edition_r, what, _rxEdition ) + && what[3].size() != 1) { if ( what[1].size() > 1 ) _epoch = strtoul( what[1].c_str(), NULL, 10 ); if ( what[2].size() ) _version = what[2]; - if ( what[3].size() ) - _release = what[3]; - - std::cout << "successful epoch *" << _epoch << "* version *" << _version << " release *" - << _release << std::endl; + if (what[3].size() ) + _release = what[3].substr(1); } else { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org