Hi all,

I'm writing a lens for apt.conf (5) and I have a problem with counters
in recursive lenses. Here is my code:


   let rec entry =
      let value = [ seq "foo" . store Rx.word ] in
      [ counter "foo"
      . label "entry"
      . Build.opt_list value Sep.space
      . (Util.eol . entry)? ]

   let test_entry = "foo bar\nbaz foo bar"

   test entry get test_entry = ?


And here is what augparse (0.7.4) says of it:

  Test result: tests/test_aptconf.aug:70.3-.32:
    { "entry"
      { "2" = "foo" }
      { "1" = "bar" }
      { "entry"
        { "3" = "baz" }
        { "1" = "foo" }
        { "2" = "bar" }
      }
    }


The numbers are all mixed up! Why is that happening?


Cheers,


Raphaël

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to