From 9ab3f09e4e4989b10b2fb747e6c4d029d052ae7a Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 15 Sep 2017 16:42:06 +0200 Subject: [PATCH] test_augeas: print also the values of nodes Easy way to exercise Augeas.get too. --- test_augeas.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test_augeas.ml b/test_augeas.ml index 1be88b7..c47db9a 100644 --- 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 -- 1.8.3.1