From 292a97fcd3b04f2ce9b5df17874638aef45c48e3 Mon Sep 17 00:00:00 2001
From: James Willis <james.s.willis@durham.ac.uk>
Date: Tue, 29 Mar 2016 12:22:02 +0100
Subject: [PATCH] Write the contents of the parameter structure to a file in
 YAML format.

---
 tests/testParser.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/testParser.c b/tests/testParser.c
index 55b3adb610..f294dc9629 100644
--- a/tests/testParser.c
+++ b/tests/testParser.c
@@ -39,9 +39,12 @@ int main(int argc, char *argv[]) {
   /* Read the parameter file. */
   parser_read_file(input_file,&param_file);
 
-  /* Print the contents of the structure. */
+  /* Print the contents of the structure to stdout. */
   parser_print_params(&param_file);
   
+  /* Print the contents of the structure to a file in YAML format. */
+  parser_write_params_to_file(&param_file,"test.yaml");
+  
   /* Retrieve parameters and store them in variables defined above. 
    * Have to specify the name of the parameter as it appears in the 
    * input file: testParserInput.yaml.*/
-- 
GitLab