[augeas-devel] Unrequested branch added?

David Lutterkort lutter at redhat.com
Mon Jan 4 18:20:31 UTC 2010


Hi Tim,

On Wed, 2009-12-30 at 14:59 +0100, Tim Stoop wrote:
> I've taken most of this example from the bottom to top wiki page. I
> have the following in my lens:
> 
> let rewriteengine = [ key "RewriteEngine" . space . store /On/ . hardeol ]
> 
> And I test it with:
> 
>         let rewriteengineon = "RewriteEngine On\n"
> 
>         test ApacheModRewrite.rewriteengine get rewriteengineon =
>                 { "RewriteEngine" = "On" }
> 
> To me it looks exactly the same like the tutorial does with the Source
> key, fairly at the beginning of the wiki page. But when I try to run
> it, I get:
> 
> $ augparse -I. tests/test_apachemodrewrite.aug
> Test failure:tests/test_apachemodrewrite.aug:6.1-7.28:
>  Expected:
> {
>   { "RewriteEngine" = "On" }
> }
> 
>  Actual:
> {
>   { "RewriteEngine" = "On"
>     {  }
>   }
> }

I bet you defined hardeol something like 'let hardeol = [ del .. ]' -
the square brackets create a new tree node. If you don't have a key or
label in there, you get a completely empty tree node, like the '{ }' in
your example.

David




More information about the augeas-devel mailing list