diff options
Diffstat (limited to 'lib/tests/test_opts2.c')
-rw-r--r-- | lib/tests/test_opts2.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/lib/tests/test_opts2.c b/lib/tests/test_opts2.c index 95c6505..2349661 100644 --- a/lib/tests/test_opts2.c +++ b/lib/tests/test_opts2.c | |||
@@ -110,20 +110,28 @@ int main(int argc, char **argv) { | |||
110 | { | 110 | { |
111 | char *argv_test[] = {"check_tcp", "--extra-opts", "--extra-opts=tcp_long_lines", (char *)NULL}; | 111 | char *argv_test[] = {"check_tcp", "--extra-opts", "--extra-opts=tcp_long_lines", (char *)NULL}; |
112 | argc_test = 3; | 112 | argc_test = 3; |
113 | char *argv_known[] = {"check_tcp", | 113 | char *argv_known[] = { |
114 | "--timeout=10", | 114 | "check_tcp", |
115 | "--escape", | 115 | "--timeout=10", |
116 | "--send=Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda " | 116 | "--escape", |
117 | "yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ " | 117 | "--send=Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda " |
118 | "yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar " | 118 | "yadda Foo bar BAZ yadda " |
119 | "BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda", | 119 | "yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda " |
120 | "--expect=Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda " | 120 | "yadda Foo bar BAZ " |
121 | "yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ " | 121 | "yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda " |
122 | "yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar " | 122 | "yadda yadda Foo bar " |
123 | "BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo " | 123 | "BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda", |
124 | "bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda", | 124 | "--expect=Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda " |
125 | "--jail", | 125 | "yadda Foo bar BAZ yadda " |
126 | (char *)NULL}; | 126 | "yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda " |
127 | "yadda Foo bar BAZ " | ||
128 | "yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda " | ||
129 | "yadda yadda Foo bar " | ||
130 | "BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ " | ||
131 | "yadda yadda yadda Foo " | ||
132 | "bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda Foo bar BAZ yadda yadda yadda", | ||
133 | "--jail", | ||
134 | (char *)NULL}; | ||
127 | argv_new = np_extra_opts(&argc_test, argv_test, "check_tcp"); | 135 | argv_new = np_extra_opts(&argc_test, argv_test, "check_tcp"); |
128 | ok(array_diff(argc_test, argv_new, 6, argv_known), "Long lines test"); | 136 | ok(array_diff(argc_test, argv_new, 6, argv_known), "Long lines test"); |
129 | my_free(&argc_test, argv_new, argv_test); | 137 | my_free(&argc_test, argv_new, argv_test); |