diff --git a/tests/testParser.c b/tests/testParser.c
index 55b3adb6102a5bdf976c77ff4be64837a3f67cc8..f294dc96296ce3982b318f7910c63bbe3852142f 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.*/