7 #include <boost/test/auto_unit_test.hpp>
9 #include "zypp/base/LogControl.h"
10 #include "zypp/base/Logger.h"
11 #include "zypp/base/Exception.h"
12 #include "zypp/ZYpp.h"
13 #include "zypp/VendorAttr.h"
15 using boost::unit_test::test_case;
21 void reconfigureZConfig( const Pathname & );
24 #define DATADIR (Pathname(TESTS_SRC_DIR) + "/zypp/data/Vendor")
26 BOOST_AUTO_TEST_CASE(vendor_test1)
28 reconfigureZConfig( DATADIR / "zypp1.conf" );
29 // No vendor definition files has been readed. So only suse,opensuse vendors are
31 BOOST_REQUIRE( VendorAttr::instance().equivalent("suse", "suse") );
32 BOOST_REQUIRE( VendorAttr::instance().equivalent("equal", "equal") );
33 BOOST_REQUIRE( VendorAttr::instance().equivalent("suse", "SuSE") );
34 BOOST_REQUIRE( VendorAttr::instance().equivalent("opensuse", "SuSE") );
35 BOOST_REQUIRE( !VendorAttr::instance().equivalent("open", "SuSE") );
36 BOOST_REQUIRE( !VendorAttr::instance().equivalent("nothing", "SuSE") );