127d3936fSVaclav Hapla 227d3936fSVaclav Hapla static char help[] = "Tests options file parsing.\n\n"; 327d3936fSVaclav Hapla 427d3936fSVaclav Hapla #include <petscsys.h> 527d3936fSVaclav Hapla #include <petscviewer.h> 627d3936fSVaclav Hapla 7*9371c9d4SSatish Balay int main(int argc, char **argv) { 8df576f88SBarry Smith /* this is listed first so that it gets into the database before the errors are created */ 9df576f88SBarry Smith PetscCall(PetscOptionsSetValue(NULL, "-error_output_stdout", NULL)); 10327415f7SBarry Smith PetscFunctionBeginUser; 11b8abcfdeSJacob Faibussowitsch PetscCall(PetscInitialize(&argc, &argv, "ex54options", help)); 12b8abcfdeSJacob Faibussowitsch PetscCall(PetscFinalize()); 13b8abcfdeSJacob Faibussowitsch return 0; 1427d3936fSVaclav Hapla } 1527d3936fSVaclav Hapla 1627d3936fSVaclav Hapla /*TEST 1727d3936fSVaclav Hapla 1827d3936fSVaclav Hapla test: 1927d3936fSVaclav Hapla suffix: 0 2027d3936fSVaclav Hapla localrunfiles: ex54options 2127d3936fSVaclav Hapla args: -options_left 0 -options_view 22660278c0SBarry Smith 2327d3936fSVaclav Hapla testset: 2427d3936fSVaclav Hapla args: -options_left 0 -options_view 2527d3936fSVaclav Hapla test: 2627d3936fSVaclav Hapla suffix: 1 2727d3936fSVaclav Hapla localrunfiles: ex54options ex54options_1a_wrong ex54options_1b_wrong ex54options_1c_wrong ex54options_1d_wrong ex54options_1e_wrong ex54options_1f_wrong ex54options_1g_wrong 2827d3936fSVaclav Hapla args: -options_file {{ex54options_1a_wrong ex54options_1b_wrong ex54options_1c_wrong ex54options_1d_wrong ex54options_1e_wrong ex54options_1f_wrong ex54options_1g_wrong}separate output} 2923eca7e2SStefano Zampini # Some machines use the fullpath in the program name, so filter with " ex54options" and not "ex54options" 30660278c0SBarry Smith filter: Error: egrep " ex54options" 3127d3936fSVaclav Hapla test: 3227d3936fSVaclav Hapla suffix: 1_options_file-ex54options_1h 3327d3936fSVaclav Hapla localrunfiles: ex54options ex54options_1h 3427d3936fSVaclav Hapla args: -options_file ex54options_1h 3527d3936fSVaclav Hapla 3627d3936fSVaclav Hapla TEST*/ 37