Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=743a8fc0eb46a18abbbdb4d436caa8bed65b94ce
commit 743a8fc0eb46a18abbbdb4d436caa8bed65b94ce Author: James Buren <r...@frugalware.org> Date: Tue Jul 28 20:32:30 2009 -0500 Test.pas * update test diff --git a/Test.pas b/Test.pas index 16e347e..7b32ad4 100644 --- a/Test.pas +++ b/Test.pas @@ -3,7 +3,10 @@ Program Test; Uses Pacman; Var - Ret : Integer; + Ret : Integer; + Db : PPM_DB; + Pkg : PPM_PKG; + PkgName : String; Begin WriteLn('Initializing pacman, phase 1.'); @@ -14,6 +17,23 @@ WriteLn('Initializing pacman, phase 2.'); Ret := pacman_initialize(PM_ROOT); if Ret = -1 then WriteLn('Failure.'); +WriteLn('Registering local database.'); +Db := pacman_db_register('local'); +If Db <> Nil Then +Begin + WriteLn('Specify a package.'); + Read(PkgName); + Pkg := pacman_db_readpkg(Db,@PkgName[1]); + If Pkg <> Nil Then + Begin + WriteLn('Package Name: ',PChar(pacman_pkg_getinfo(Pkg,PM_PKG_NAME))); + WriteLn('Package Version: ',PChar(pacman_pkg_getinfo(Pkg,PM_PKG_VERSION))); + End + Else + WriteLn('Package not found: ',PkgName); +End +Else + WriteLn('Failure.'); WriteLn('Releasing pacman.'); pacman_release; End. _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git