""" Tests for pydar/specfile.py """ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Copyright 2004 Dries Verachtert # This class can be used for reading the values of certain tags from spec files import re, sys from log4py import Logger sys.path.append("../pydar") from specfile import SpecFile # all paths relative from svn/trunk/tools/pydar2/tests/ directory sf = SpecFile('../../../rpms/aldo/aldo.spec',' --define "fc3 1"') for tag in sf.rpmforgetags: print 'rpmforge tag: ' + tag print 'value: ' + sf.rpmforgetags[tag] for tag in sf.standardtags: print 'standard tag: ' + tag print 'value: ' + sf.standardtags[tag] print str(sf.getBuildRequires())