git.annexia.org
/
ocaml-augeas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9c904a
)
test_augeas: print also the values of nodes
author
Pino Toscano
<ptoscano@redhat.com>
Fri, 15 Sep 2017 14:42:06 +0000
(16:42 +0200)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 15 Sep 2017 15:45:28 +0000
(16:45 +0100)
Easy way to exercise Augeas.get too.
test_augeas.ml
patch
|
blob
|
history
diff --git
a/test_augeas.ml
b/test_augeas.ml
index
1be88b7
..
c47db9a
100644
(file)
--- a/
test_augeas.ml
+++ b/
test_augeas.ml
@@
-26,7
+26,12
@@
let () =
(* Print all files recursively. *)
let rec print path =
- if path <> "" then print_endline path;
+ if path <> "" then (
+ let value = Augeas.get aug path in
+ match value with
+ | None -> print_endline path
+ | Some value -> Printf.printf "%s -> '%s'\n%!" path value
+ );
let files = List.sort compare (Augeas.matches aug (path ^ "/*")) in
List.iter print files
in