Allow options and input files in any order in pdfium_test Give pdfium_test more flexibility, so it can take options and input files in any order, instead of all options first. This flexibility makes it easier for ClusterFuzz to pass options to pdfium_test. Bug: 391095005 Change-Id: Idd9f8c916e7a1acaf65ff8edf1c74df4d1ecc265 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/128070 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/pdfium_test.cc b/testing/pdfium_test.cc index 59e1b21..f552e1d 100644 --- a/testing/pdfium_test.cc +++ b/testing/pdfium_test.cc
@@ -731,11 +731,9 @@ fprintf(stderr, "Unrecognized argument %s\n", cur_arg.c_str()); return false; } else { - break; + files->push_back(cur_arg); } } - for (size_t i = cur_idx; i < args.size(); i++) - files->push_back(args[i]); return true; }