- if (v_opt)
- printf("** testing %s\n", all_terms[t_run]);
- if (len_names == 1) {
- if (a_opt) {
- /* for each combination of values */
- memset(all_parms, 0, sizeof(all_parms));
- do {
- test_tparm(all_names[0], all_parms);
+ /*
+ * Most of the capabilities have no parameters, e.g., they are
+ * function-keys or simple operations such as clear-display.
+ * Ignore those, since they do not really exercise tparm.
+ */
+ use_caps = 0;
+ for (n = 0; n < len_caps; ++n) {
+ char *value = tigetstr(all_caps[n]);
+ if (relevant(all_caps[n], value)) {
+ cap_name[use_caps] = all_caps[n];
+ cap_data[use_caps] = value;
+ use_caps++;
+ }
+ }
+
+ if (v_opt) {
+ printf("[%d:%d] %d cap%s * %ld param%s \"%s\"\n",
+ r_run + 1, r_opt,
+ PLURAL(use_caps),
+ PLURAL(use_parms),
+ all_terms[t_run]);
+ }
+
+ if (a_opt) {
+ /* for each combination of values */
+ memset(all_parms, 0, sizeof(all_parms));
+ do {
+ for (n_run = 0; n_run < use_caps; ++n_run) {
+ test_tparm(cap_name[n_run], cap_data[n_run], all_parms);