Commit 3897416c authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Extend parser tests for case when we return an optional string twice, these should match

parent b10053fa
......@@ -208,5 +208,15 @@ int main(int argc, char *argv[]) {
assert(haveoptwords1 == 0);
assert(haveoptwords2 == 1);
/* Issue 681, parser_get_opt_param_string returns same value. */
char run_name_1[80];
char run_name_2[80];
parser_get_opt_param_string(&param_file, "MetaData:run_name", run_name_1,
"Untitled SWIFT simulation");
parser_get_opt_param_string(&param_file, "MetaData:run_name", run_name_2,
"banana");
assert(strcmp(run_name_1, run_name_2) == 0);
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment