* options: "46a:b:c:d:himp:q:t:vx:";
*/
static const char *single_dash_opts = "46himv";
+static const char *dash_opts = "46abcdhimpqtvx";
+
static bool
dash_option(char *option, char *next, bool *open_type_class) {
char opt, *value;
}
option = &option[1];
}
+ if (strlen(option) == 0U) {
+ continue;
+ }
+ /* Look for dash value option. */
+ if (strpbrk(option, dash_opts) != &option[0] ||
+ strlen(option) > 1U) {
+ /* Error or value in option. */
+ continue;
+ }
+ /* Dash value is next argument so we need to skip it. */
+ argc--, argv++;
+ /* Handle missing argument */
+ if (argc == 0)
+ break;
}
}
grep "Dump of all outstanding memory allocations" dig.out.test$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
-
else
echo_i "$DIG is needed, so skipping these dig tests"
fi
grep "a.example." < delv.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
+
+ n=`expr $n + 1`
+ echo_i "checking delv H is ignored, and treated like IN ($n)"
+ ret=0
+ $DELV $DELVOPTS @10.53.0.3 -c CH -t a a.example > delv.out.test$n || ret=1
+ grep "a.example." < delv.out.test$n > /dev/null || ret=1
+ if [ $ret != 0 ]; then echo_i "failed"; fi
+ status=`expr $status + $ret`
+
+ n=`expr $n + 1`
+ echo_i "check that delv -q -m works ($n)"
+ ret=0
+ $DELV $DELVOPTS @10.53.0.3 -q -m > delv.out.test$n 2>&1
+ grep '^; -m\..*[0-9]*.*IN.*ANY.*;' delv.out.test$n > /dev/null || ret=1
+ grep "^add " delv.out.test$n > /dev/null && ret=1
+ grep "^del " delv.out.test$n > /dev/null && ret=1
+ if [ $ret != 0 ]; then echo_i "failed"; fi
+ status=`expr $status + $ret`
else
echo_i "$DELV is needed, so skipping these delv tests"
fi