Bump to 1.14.1
[platform/upstream/augeas.git] / tests / modules / pass_label_value.aug
1 module Pass_label_value =
2
3 let l = [ label "label" . value "value" ]
4
5 test l get "" = { "label" = "value" }
6
7 test l put "" after rm "/foo" = ""
8
9 let word = /[^ \t\n]+/
10 let ws = del /[ \t]+/ " "
11 let chain = [ key "RewriteCond" . ws .
12               [ label "eq" . store word ] . ws . store word .
13               ([ label "chain_as" . ws . del "[OR]" "[OR]" . value "or"]
14               |[ label "chain_as" . value "and" ]) ]
15
16 test chain get "RewriteCond %{var} val [OR]" =
17   { "RewriteCond" = "val"
18     { "eq" = "%{var}" }
19     { "chain_as" = "or" } }
20
21 test chain get "RewriteCond %{var} lue" =
22   { "RewriteCond" = "lue"
23     { "eq" = "%{var}" }
24     { "chain_as" = "and" } }
25
26 test chain put "RewriteCond %{var} val [OR]" after
27   set "/RewriteCond/chain_as" "and" = "RewriteCond %{var} val"