[augeas-devel] [PATCH 5 of 5] Add a test to check we take the right branch

David Lutterkort dlutter at redhat.com
Fri May 23 17:23:35 UTC 2008


1 file changed, 6 insertions(+)
lenses/tests/test_yum.aug |    6 ++++++


# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1211563376 25200
# Node ID 319f3f20944a92eb41b4f0ec233f5270ea3a1e94
# Parent  d6def056dedee3d4f83e473dc4a20a4fb5e26b5b
Add a test to check we take the right branch

This does essentially the same as the test Pass_prefix_union introduced
with cset 489:3f4414038a30, but in a real world lens.

diff -r d6def056dede -r 319f3f20944a lenses/tests/test_yum.aug
--- a/lenses/tests/test_yum.aug	Fri May 23 10:17:06 2008 -0700
+++ b/lenses/tests/test_yum.aug	Fri May 23 10:22:56 2008 -0700
@@ -75,6 +75,12 @@ installonly_limit=100
   (* results that surpise the unsuspecting user                         *)
   test Yum.lns get "[repo]\nbaseurl=url1\nbaseurl=url2\n" = *
 
+  (* This checks that we take the right branch in the section lens.     *)
+  test Yum.section get "[repo]\nname=A name\nbaseurl=url1\n" = 
+    { "repo"
+        { "name" = "A name" }
+        { "baseurl" = "url1" } }
+
 (* Local Variables: *)
 (* mode: caml       *)
 (* End:             *)




More information about the augeas-devel mailing list