retval = false;
break;
}
- else if (c >= LONGOPT_VAL_BASE && c < LONGOPT_VAL_BASE + n_longopts)
+ else if (c >= LONGOPT_VAL_BASE && c < LONGOPT_VAL_BASE + n_longopts + 1)
{
struct argv_option_plus *aop = &ap->options[c - LONGOPT_VAL_BASE];
aop->cb (aop->base.id, aop->aux);
])
AT_CHECK([sed '/proximate/q' < stderr], [0], [expout])
AT_CLEANUP
+
+
+dnl This tests for a crash which was observed with --syntax
+AT_SETUP([argument parsing])
+
+AT_DATA([main.sps], [dnl
+ECHO 'This is a test'.
+FINISH.
+])
+
+AT_CHECK([pspp --syntax=enhanced main.sps], [0], [ignore])
+
+AT_CLEANUP