~ubuntu-branches/debian/experimental/apt/experimental

« back to all changes in this revision

Viewing changes to test/test_udevcdrom.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2010-02-18 22:07:23 UTC
  • mfrom: (9.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100218220723-zb7zdh6fmsmp30tr
Tags: 0.7.26~exp2
fix crash when LANGUAGE is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <apt-pkg/cdrom.h>
 
2
#include <stdio.h>
 
3
#include <assert.h>
 
4
 
 
5
int main()
 
6
{
 
7
   int i;
 
8
   pkgUdevCdromDevices c;
 
9
   assert(c.Dlopen());
 
10
 
 
11
   vector<CdromDevice> l;
 
12
   l = c.Scan();
 
13
   assert(l.size() > 0);
 
14
   for (i=0;i<l.size();i++)
 
15
      std::cerr << l[i].DeviceName << " " 
 
16
                << l[i].Mounted << " " 
 
17
                << l[i].MountPath << std::endl;
 
18
   
 
19
}