diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-10-02 16:15:59 -0700 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-11-12 20:49:08 +0100 |
commit | 6a0ba303035997fcd5f28bcd32297f9bc21bd45a (patch) | |
tree | ad6dfc64e0bf363d3201c286554d983b1cad342d /test | |
parent | 0e18cc6d27e59e42c6632b21c5502174c8a9eb08 (diff) |
Sort option flags
Keep the option flags in alphabetical order. This makes it easier to
check for collisions or missing handlers.
Avoids an internal error when passing flags -c, -r or -v to
cairo-analyse-trace.
Diffstat (limited to 'test')
-rw-r--r-- | test/cairo-test-runner.c | 16 | ||||
-rw-r--r-- | test/cairo-test-trace.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c index 28e4b5dc..c0a7e953 100644 --- a/test/cairo-test-runner.c +++ b/test/cairo-test-runner.c @@ -367,7 +367,7 @@ _parse_cmdline (cairo_test_runner_t *runner, int *argc, char **argv[]) int c; while (1) { - c = _cairo_getopt (*argc, *argv, ":afkxsl"); + c = _cairo_getopt (*argc, *argv, ":afklsx"); if (c == -1) break; @@ -375,21 +375,21 @@ _parse_cmdline (cairo_test_runner_t *runner, int *argc, char **argv[]) case 'a': runner->full_test = TRUE; break; - case 's': - runner->slow = TRUE; + case 'f': + runner->foreground = TRUE; + break; + case 'k': + runner->keyword_match = TRUE; break; case 'l': runner->list_only = TRUE; break; - case 'f': - runner->foreground = TRUE; + case 's': + runner->slow = TRUE; break; case 'x': runner->exit_on_failure = TRUE; break; - case 'k': - runner->keyword_match = TRUE; - break; default: fprintf (stderr, "Internal error: unhandled option: %c\n", c); /* fall-through */ diff --git a/test/cairo-test-trace.c b/test/cairo-test-trace.c index fb1bd422..89ef6516 100644 --- a/test/cairo-test-trace.c +++ b/test/cairo-test-trace.c @@ -1554,7 +1554,7 @@ parse_options (test_trace_t *test, int argc, char *argv[]) test->num_exclude_names = 0; while (1) { - c = _cairo_getopt (argc, argv, "x:l"); + c = _cairo_getopt (argc, argv, "lx:"); if (c == -1) break; |