Lines Matching refs:verbs
22 #include "verbs.h"
28 #define test_dispatch_one(argv, verbs, expected) \
30 assert_se(dispatch_verb(strv_length(argv), argv, verbs, NULL) == expected);
33 static const Verb verbs[] = {
46 test_dispatch_one(STRV_MAKE("command-not-found"), verbs, -EINVAL);
49 test_dispatch_one(STRV_MAKE("show"), verbs, 0);
52 test_dispatch_one(STRV_MAKE("copy-to", "foo"), verbs, -EINVAL);
55 test_dispatch_one(STRV_MAKE("status", "foo", "bar"), verbs, 0);
58 test_dispatch_one(STRV_MAKE("copy-to", "foo", "bar", "baz", "quux", "qaax"), verbs, -EINVAL);
61 test_dispatch_one(STRV_MAKE_EMPTY, verbs, 0);
65 static const Verb verbs[] = {
70 test_dispatch_one(STRV_MAKE(NULL), verbs, -EINVAL);