From: Richard W.M. Jones Date: Wed, 2 Mar 2011 05:11:10 +0000 (+0000) Subject: java: Add a test of g.list_filesystems (a function that returns a Map). X-Git-Tag: 1.9.9~2 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=21fef55ca4907aa9872754f20320c24c7f8a5fac;p=libguestfs.git java: Add a test of g.list_filesystems (a function that returns a Map). --- diff --git a/java/t/GuestFS010Basic.java b/java/t/GuestFS010Basic.java index 137fad3..84b96f8 100644 --- a/java/t/GuestFS010Basic.java +++ b/java/t/GuestFS010Basic.java @@ -17,6 +17,7 @@ */ import java.io.*; +import java.util.Map; import com.redhat.et.libguestfs.*; public class GuestFS010Basic @@ -45,6 +46,15 @@ public class GuestFS010Basic assert lvs[0].equals ("/dev/VG/LV1"); assert lvs[1].equals ("/dev/VG/LV2"); + g.mkfs ("ext2", "/dev/VG/LV1"); + + Map m = g.list_filesystems (); + assert m.containsKey ("/dev/VG/LV1"); + assert m.size () == 2; + + assert m.get ("/dev/VG/LV1").equals ("ext2"); + assert m.get ("/dev/VG/LV2").equals ("unknown"); + g.close (); File f2 = new File ("test.img");