File: pass_subtree_growth.aug

package info (click to toggle)
augeas 0.2.2-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,080 kB
  • ctags: 3,084
  • sloc: ansic: 22,252; sh: 10,348; yacc: 435; ruby: 410; lex: 172; makefile: 126
file content (20 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Pass_subtree_growth =

  (* Make sure that a subtree that is not the lowest one does indeed *)
  (* grow the tree, instead of just setting the label of an enclosed *)
  (* subtree. This is only a problem if the enclosed subtree does    *)
  (* not have a label                                                *)

  let lns = [ label "outer" . [ store /a/ ] ]

  (* The improper result is { "outer" = "a" } *)
  test lns get "a" = { "outer" { = "a" } }

  (* This produces a tree { "outer" = "b" { = "a" } }         *)
  (* but the value for "outer" is never used in put           *)
  (* (That should probably be flagged as an error separately) *)
  test lns put "a" after set "outer" "b" = "a"

(* Local Variables: *)
(* mode: caml       *)
(* End:             *)