The Battle for Wesnoth  1.19.7+dev
test_commandline_options.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2024
3  by Lukasz Dobrogowski <lukasz.dobrogowski@gmail.com>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 #define GETTEXT_DOMAIN "wesnoth-test"
16 
17 #include "commandline_options.hpp"
18 
19 #include <boost/test/unit_test.hpp>
20 
21 BOOST_AUTO_TEST_SUITE( cmdline_opts )
22 
23 BOOST_AUTO_TEST_CASE (test_empty_options)
24 {
25 
26  std::vector<std::string> args {"wesnoth"};
27  commandline_options co(args);
28 
29  BOOST_CHECK(!co.campaign);
30  BOOST_CHECK(!co.campaign_difficulty);
31  BOOST_CHECK(!co.campaign_scenario);
32  BOOST_CHECK(!co.campaign_skip_story);
33  BOOST_CHECK(!co.clock);
34  BOOST_CHECK(!co.data_dir);
35  BOOST_CHECK(!co.data_path);
36  BOOST_CHECK(!co.debug);
37 #ifdef DEBUG_WINDOW_LAYOUT_GRAPHS
38  BOOST_CHECK(!co.debug_dot_domain);
39  BOOST_CHECK(!co.debug_dot_level);
40 #endif
41  BOOST_CHECK(!co.editor);
42  BOOST_CHECK(!co.fps);
43  BOOST_CHECK(!co.fullscreen);
44  BOOST_CHECK(!co.help);
45  BOOST_CHECK(!co.load);
46  BOOST_CHECK(!co.log);
47  BOOST_CHECK(!co.logdomains);
48  BOOST_CHECK(!co.multiplayer);
49  BOOST_CHECK(!co.multiplayer_ai_config);
50  BOOST_CHECK(!co.multiplayer_algorithm);
51  BOOST_CHECK(!co.multiplayer_controller);
52  BOOST_CHECK(!co.multiplayer_era);
53  BOOST_CHECK(!co.multiplayer_exit_at_end);
54  BOOST_CHECK(!co.multiplayer_ignore_map_settings);
55  BOOST_CHECK(!co.multiplayer_label);
56  BOOST_CHECK(!co.multiplayer_parm);
57  BOOST_CHECK(!co.multiplayer_side);
58  BOOST_CHECK(!co.multiplayer_turns);
59  BOOST_CHECK(!co.max_fps);
60  BOOST_CHECK(!co.nocache);
61  BOOST_CHECK(!co.nogui);
62  BOOST_CHECK(!co.nomusic);
63  BOOST_CHECK(!co.nosound);
64  BOOST_CHECK(!co.new_widgets);
65  BOOST_CHECK(!co.preprocess);
66  BOOST_CHECK(!co.preprocess_defines);
67  BOOST_CHECK(!co.preprocess_input_macros);
68  BOOST_CHECK(!co.preprocess_output_macros);
69  BOOST_CHECK(!co.preprocess_path);
70  BOOST_CHECK(!co.preprocess_target);
71  BOOST_CHECK(!co.resolution);
72  BOOST_CHECK(!co.rng_seed);
73  BOOST_CHECK(!co.multiplayer_scenario);
74  BOOST_CHECK(!co.server);
75  BOOST_CHECK(!co.screenshot);
76  BOOST_CHECK(!co.screenshot_map_file);
77  BOOST_CHECK(!co.screenshot_output_file);
78  BOOST_CHECK(!co.test);
79  BOOST_CHECK(!co.userdata_dir);
80  BOOST_CHECK(!co.userdata_path);
81  BOOST_CHECK(!co.validcache);
82  BOOST_CHECK(!co.version);
83  BOOST_CHECK(!co.windowed);
84  BOOST_CHECK(!co.with_replay);
85 }
86 
87 BOOST_AUTO_TEST_CASE (test_default_options)
88 {
89  std::vector<std::string> args {
90  "wesnoth",
91  "--campaign",
92  "--editor",
93  "--logdomains",
94  "--preprocess-output-macros",
95  "--server",
96  "--test"};
97 
98  commandline_options co(args);
99  BOOST_CHECK(co.campaign && co.campaign->empty());
100  BOOST_CHECK(!co.campaign_difficulty);
101  BOOST_CHECK(!co.campaign_scenario);
102  BOOST_CHECK(!co.campaign_skip_story);
103  BOOST_CHECK(!co.clock);
104  BOOST_CHECK(!co.data_dir);
105  BOOST_CHECK(!co.data_path);
106  BOOST_CHECK(!co.debug);
107 #ifdef DEBUG_WINDOW_LAYOUT_GRAPHS
108  BOOST_CHECK(!co.debug_dot_domain);
109  BOOST_CHECK(!co.debug_dot_level);
110 #endif
111  BOOST_CHECK(co.editor && co.editor->empty());
112  BOOST_CHECK(!co.fps);
113  BOOST_CHECK(!co.fullscreen);
114  BOOST_CHECK(!co.help);
115  BOOST_CHECK(!co.load);
116  BOOST_CHECK(!co.log);
117  BOOST_CHECK(co.logdomains && co.logdomains->empty());
118  BOOST_CHECK(!co.multiplayer);
119  BOOST_CHECK(!co.multiplayer_ai_config);
120  BOOST_CHECK(!co.multiplayer_algorithm);
121  BOOST_CHECK(!co.multiplayer_controller);
122  BOOST_CHECK(!co.multiplayer_era);
123  BOOST_CHECK(!co.multiplayer_exit_at_end);
124  BOOST_CHECK(!co.multiplayer_ignore_map_settings);
125  BOOST_CHECK(!co.multiplayer_label);
126  BOOST_CHECK(!co.multiplayer_parm);
127  BOOST_CHECK(!co.multiplayer_scenario);
128  BOOST_CHECK(!co.multiplayer_side);
129  BOOST_CHECK(!co.multiplayer_turns);
130  BOOST_CHECK(!co.max_fps);
131  BOOST_CHECK(!co.nocache);
132  BOOST_CHECK(!co.nogui);
133  BOOST_CHECK(!co.nomusic);
134  BOOST_CHECK(!co.nosound);
135  BOOST_CHECK(!co.new_widgets);
136  BOOST_CHECK(!co.preprocess);
137  BOOST_CHECK(!co.preprocess_defines);
138  BOOST_CHECK(!co.preprocess_input_macros);
139  BOOST_CHECK(co.preprocess_output_macros && co.preprocess_output_macros->empty());
140  BOOST_CHECK(!co.preprocess_path);
141  BOOST_CHECK(!co.preprocess_target);
142  BOOST_CHECK(!co.resolution);
143  BOOST_CHECK(!co.rng_seed);
144  BOOST_CHECK(co.server && co.server->empty());
145  BOOST_CHECK(!co.screenshot);
146  BOOST_CHECK(!co.screenshot_map_file);
147  BOOST_CHECK(!co.screenshot_output_file);
148  BOOST_CHECK(co.test && co.test->empty());
149  BOOST_CHECK(!co.userdata_dir);
150  BOOST_CHECK(!co.userdata_path);
151  BOOST_CHECK(!co.validcache);
152  BOOST_CHECK(!co.version);
153  BOOST_CHECK(!co.windowed);
154  BOOST_CHECK(!co.with_replay);
155 }
156 
157 BOOST_AUTO_TEST_CASE (test_full_options)
158 {
159  std::vector<std::string> args {
160  "wesnoth",
161  "--ai-config=1:aifoo",
162  "--ai-config=2:aibar",
163  "--algorithm=3:algfoo",
164  "--algorithm=4:algbar",
165  "--campaign=campfoo",
166  "--campaign-difficulty=16",
167  "--campaign-scenario=scenfoo",
168  "--campaign-skip-story",
169  "--clock",
170  "--controller=5:confoo",
171  "--controller=6:conbar",
172  "--data-dir=datadirfoo",
173  "--data-path",
174  "--debug",
175 #ifdef DEBUG_WINDOW_LAYOUT_GRAPHS
176  "--debug-dot-domain=ddfoo",
177  "--debug-dot-level=dlfoo",
178 #endif
179  "--editor=editfoo",
180  "--era=erafoo",
181  "--exit-at-end",
182  "--fps",
183  "--fullscreen",
184  "--help",
185  "--ignore-map-settings",
186  "--label=labelfoo",
187  "--load=loadfoo",
188  "--log-error=errfoo,errbar/*",
189  "--log-warning=warnfoo,warnfoo/bar",
190  "--log-info=infofoo",
191  "--log-debug=dbgfoo,dbgbar,dbg/foo/bar/baz",
192  "--logdomains=filterfoo",
193  "--max-fps=100",
194  "--multiplayer",
195  "--new-widgets",
196  "--nocache",
197  "--nomusic",
198  "--nosound",
199  "--nogui",
200  "--parm=7:parmfoo:valfoo",
201  "--parm=8:parmbar:valbar",
202  "--preprocess", "preppathfoo", "preptargfoo",
203  "--preprocess-defines=DEFFOO,DEFBAR",
204  "--preprocess-input-macros=inmfoo",
205  "--preprocess-output-macros=outmfoo",
206  "--resolution=800x600",
207  "--rng-seed=1234",
208  "--scenario=scenfoo",
209  "--screenshot", "mapfoo", "outssfoo",
210  "--side=9:sidefoo",
211  "--side=10:sidebar",
212  "--server=servfoo",
213  "--test=testfoo",
214  "--turns=42",
215  "--userdata-dir=userdatadirfoo",
216  "--userdata-path",
217  "--validcache",
218  "--version",
219  "--windowed",
220  "--with-replay"};
221 
222  commandline_options co(args);
223 
224  BOOST_CHECK(co.campaign && *co.campaign == "campfoo");
225  BOOST_CHECK(co.campaign_difficulty && *co.campaign_difficulty == 16);
226  BOOST_CHECK(co.campaign_scenario && *co.campaign_scenario == "scenfoo");
227  BOOST_CHECK(co.campaign_skip_story);
228  BOOST_CHECK(co.clock);
229  BOOST_CHECK(co.data_dir && *co.data_dir == "datadirfoo");
230  BOOST_CHECK(co.data_path);
231  BOOST_CHECK(co.debug);
232 #ifdef DEBUG_WINDOW_LAYOUT_GRAPHS
233  BOOST_CHECK(co.debug_dot_domain && *co.debug_dot_domain == "ddfoo");
234  BOOST_CHECK(co.debug_dot_level && *co.debug_dot_level == "dlfoo");
235 #endif
236  BOOST_CHECK(co.editor && *co.editor == "editfoo");
237  BOOST_CHECK(co.fps);
238  BOOST_CHECK(co.fullscreen);
239  BOOST_CHECK(co.help);
240  BOOST_CHECK(co.load && *co.load == "loadfoo");
241  BOOST_CHECK(co.log);
242  BOOST_CHECK(co.log->size()==8);
243  BOOST_CHECK(co.log->at(0).first == lg::severity::LG_ERROR && co.log->at(1).first == lg::severity::LG_ERROR);
244  BOOST_CHECK(co.log->at(0).second == "errfoo" && co.log->at(1).second == "errbar/*");
245  BOOST_CHECK(co.log->at(2).first == lg::severity::LG_WARN && co.log->at(3).first == lg::severity::LG_WARN);
246  BOOST_CHECK(co.log->at(2).second == "warnfoo" && co.log->at(3).second == "warnfoo/bar");
247  BOOST_CHECK(co.log->at(4).first == lg::severity::LG_INFO);
248  BOOST_CHECK(co.log->at(4).second == "infofoo");
249  BOOST_CHECK(co.log->at(5).first == lg::severity::LG_DEBUG &&
250  co.log->at(6).first == lg::severity::LG_DEBUG && co.log->at(7).first == lg::severity::LG_DEBUG);
251  BOOST_CHECK(co.log->at(5).second == "dbgfoo" && co.log->at(6).second == "dbgbar" && co.log->at(7).second == "dbg/foo/bar/baz");
252  BOOST_CHECK(co.logdomains && *co.logdomains == "filterfoo");
253  BOOST_CHECK(co.multiplayer);
254  BOOST_CHECK(co.multiplayer_ai_config);
255  BOOST_CHECK(co.multiplayer_ai_config->size() == 2);
256  BOOST_CHECK(co.multiplayer_ai_config->at(0).first == 1 && co.multiplayer_ai_config->at(0).second == "aifoo");
257  BOOST_CHECK(co.multiplayer_ai_config->at(1).first == 2 && co.multiplayer_ai_config->at(1).second == "aibar");
258  BOOST_CHECK(co.multiplayer_algorithm);
259  BOOST_CHECK(co.multiplayer_algorithm->at(0).first == 3 && co.multiplayer_algorithm->at(0).second == "algfoo");
260  BOOST_CHECK(co.multiplayer_algorithm->at(1).first == 4 && co.multiplayer_algorithm->at(1).second == "algbar");
261  BOOST_CHECK(co.multiplayer_controller);
262  BOOST_CHECK(co.multiplayer_controller->at(0).first == 5 && co.multiplayer_controller->at(0).second == "confoo");
263  BOOST_CHECK(co.multiplayer_controller->at(1).first == 6 && co.multiplayer_controller->at(1).second == "conbar");
264  BOOST_CHECK(co.multiplayer_era && *co.multiplayer_era == "erafoo");
265  BOOST_CHECK(co.multiplayer_exit_at_end);
266  BOOST_CHECK(co.multiplayer_ignore_map_settings);
267  BOOST_CHECK(co.multiplayer_label && *co.multiplayer_label == "labelfoo");
268  BOOST_CHECK(co.multiplayer_parm);
269  BOOST_CHECK(std::get<0>(co.multiplayer_parm->at(0)) == 7 && std::get<1>(co.multiplayer_parm->at(0)) == "parmfoo" && std::get<2>(co.multiplayer_parm->at(0)) == "valfoo");
270  BOOST_CHECK(std::get<0>(co.multiplayer_parm->at(1)) == 8 && std::get<1>(co.multiplayer_parm->at(1)) == "parmbar" && std::get<2>(co.multiplayer_parm->at(1)) == "valbar");
271  BOOST_CHECK(co.multiplayer_scenario && *co.multiplayer_scenario == "scenfoo");
272  BOOST_CHECK(co.multiplayer_side);
273  BOOST_CHECK(co.multiplayer_side->size() == 2);
274  BOOST_CHECK(co.multiplayer_side->at(0).first == 9 && co.multiplayer_side->at(0).second == "sidefoo");
275  BOOST_CHECK(co.multiplayer_side->at(1).first == 10 && co.multiplayer_side->at(1).second == "sidebar");
276  BOOST_CHECK(co.multiplayer_turns && *co.multiplayer_turns == "42");
277  BOOST_CHECK(co.max_fps && *co.max_fps == 100);
278  BOOST_CHECK(co.nocache);
279  BOOST_CHECK(co.nogui);
280  BOOST_CHECK(co.nomusic);
281  BOOST_CHECK(co.nosound);
282  BOOST_CHECK(co.new_widgets);
283  BOOST_CHECK(co.preprocess && co.preprocess_path && co.preprocess_target);
284  BOOST_CHECK(*co.preprocess_path == "preppathfoo" && *co.preprocess_target == "preptargfoo");
285  BOOST_CHECK(co.preprocess_defines && co.preprocess_defines->size() == 2);
286  BOOST_CHECK(co.preprocess_defines->at(0) == "DEFFOO" && co.preprocess_defines->at(1) == "DEFBAR");
287  BOOST_CHECK(co.preprocess_input_macros && *co.preprocess_input_macros == "inmfoo");
288  BOOST_CHECK(co.preprocess_output_macros && *co.preprocess_output_macros == "outmfoo");
289  BOOST_CHECK(co.resolution);
290  BOOST_CHECK(co.resolution->first == 800 && co.resolution->second == 600);
291  BOOST_CHECK(co.rng_seed && *co.rng_seed == 1234);
292  BOOST_CHECK(co.server && *co.server == "servfoo");
293  BOOST_CHECK(co.screenshot && co.screenshot_map_file && co.screenshot_output_file);
294  BOOST_CHECK(*co.screenshot_map_file == "mapfoo" && *co.screenshot_output_file == "outssfoo");
295  BOOST_CHECK(co.test && *co.test == "testfoo");
296  BOOST_CHECK(co.userdata_dir && *co.userdata_dir == "userdatadirfoo");
297  BOOST_CHECK(co.userdata_path);
298  BOOST_CHECK(co.validcache);
299  BOOST_CHECK(co.version);
300  BOOST_CHECK(co.windowed);
301  BOOST_CHECK(co.with_replay);
302 }
303 
304 BOOST_AUTO_TEST_CASE (test_positional_options)
305 {
306  std::vector<std::string> args {
307  "wesnoth",
308  "datadirfoo"};
309 
310  commandline_options co(args);
311 
312  BOOST_CHECK(!co.campaign);
313  BOOST_CHECK(!co.campaign_difficulty);
314  BOOST_CHECK(!co.campaign_scenario);
315  BOOST_CHECK(!co.campaign_skip_story);
316  BOOST_CHECK(!co.clock);
317  BOOST_CHECK(co.data_dir && *co.data_dir == "datadirfoo");
318  BOOST_CHECK(!co.data_path);
319  BOOST_CHECK(!co.debug);
320 #ifdef DEBUG_WINDOW_LAYOUT_GRAPHS
321  BOOST_CHECK(!co.debug_dot_domain);
322  BOOST_CHECK(!co.debug_dot_level);
323 #endif
324  BOOST_CHECK(!co.editor);
325  BOOST_CHECK(!co.fps);
326  BOOST_CHECK(!co.fullscreen);
327  BOOST_CHECK(!co.help);
328  BOOST_CHECK(!co.load);
329  BOOST_CHECK(!co.log);
330  BOOST_CHECK(!co.logdomains);
331  BOOST_CHECK(!co.multiplayer);
332  BOOST_CHECK(!co.multiplayer_ai_config);
333  BOOST_CHECK(!co.multiplayer_algorithm);
334  BOOST_CHECK(!co.multiplayer_controller);
335  BOOST_CHECK(!co.multiplayer_era);
336  BOOST_CHECK(!co.multiplayer_exit_at_end);
337  BOOST_CHECK(!co.multiplayer_ignore_map_settings);
338  BOOST_CHECK(!co.multiplayer_label);
339  BOOST_CHECK(!co.multiplayer_parm);
340  BOOST_CHECK(!co.multiplayer_scenario);
341  BOOST_CHECK(!co.multiplayer_side);
342  BOOST_CHECK(!co.multiplayer_turns);
343  BOOST_CHECK(!co.max_fps);
344  BOOST_CHECK(!co.nocache);
345  BOOST_CHECK(!co.nogui);
346  BOOST_CHECK(!co.nomusic);
347  BOOST_CHECK(!co.nosound);
348  BOOST_CHECK(!co.new_widgets);
349  BOOST_CHECK(!co.preprocess);
350  BOOST_CHECK(!co.preprocess_defines);
351  BOOST_CHECK(!co.preprocess_input_macros);
352  BOOST_CHECK(!co.preprocess_output_macros);
353  BOOST_CHECK(!co.preprocess_path);
354  BOOST_CHECK(!co.preprocess_target);
355  BOOST_CHECK(!co.resolution);
356  BOOST_CHECK(!co.rng_seed);
357  BOOST_CHECK(!co.server);
358  BOOST_CHECK(!co.screenshot);
359  BOOST_CHECK(!co.screenshot_map_file);
360  BOOST_CHECK(!co.screenshot_output_file);
361  BOOST_CHECK(!co.test);
362  BOOST_CHECK(!co.userdata_dir);
363  BOOST_CHECK(!co.userdata_path);
364  BOOST_CHECK(!co.validcache);
365  BOOST_CHECK(!co.version);
366  BOOST_CHECK(!co.windowed);
367  BOOST_CHECK(!co.with_replay);
368 }
369 
370 BOOST_AUTO_TEST_CASE (test_log_domain_severity_override_order)
371 {
372  std::vector<std::string> args {
373  "wesnoth",
374  "--log-error=gui/draw",
375  "--log-info=all,gui/general",
376  "--log-debug=gui/*",
377  "--log-none=all,gui/general,gui/draw",
378  "--log-error=gui/general"};
379 
380  commandline_options co(args);
381 
382  BOOST_CHECK(co.log->at(0).first == lg::severity::LG_ERROR && co.log->at(0).second == "gui/draw");
383  BOOST_CHECK(co.log->at(1).first == lg::severity::LG_INFO && co.log->at(1).second == "all");
384  BOOST_CHECK(co.log->at(2).first == lg::severity::LG_INFO && co.log->at(2).second == "gui/general");
385  BOOST_CHECK(co.log->at(3).first == lg::severity::LG_DEBUG && co.log->at(3).second == "gui/*");
386  BOOST_CHECK(co.log->at(4).first == lg::severity::LG_NONE && co.log->at(4).second == "all");
387  BOOST_CHECK(co.log->at(5).first == lg::severity::LG_NONE && co.log->at(5).second == "gui/general");
388  BOOST_CHECK(co.log->at(6).first == lg::severity::LG_NONE && co.log->at(6).second == "gui/draw");
389  BOOST_CHECK(co.log->at(7).first == lg::severity::LG_ERROR && co.log->at(7).second == "gui/general");
390 }
391 
392 BOOST_AUTO_TEST_SUITE_END()
bool nogui
True if –nogui was given on the command line.
utils::optional< std::vector< std::pair< unsigned int, std::string > > > multiplayer_side
Non-empty if –side was given on the command line.
utils::optional< std::pair< int, int > > resolution
Pair of AxB values specified after –resolution.
utils::optional< std::string > screenshot_map_file
Map file to make a screenshot of.
utils::optional< std::string > multiplayer_scenario
Non-empty if –scenario was given on the command line.
utils::optional< std::string > test
Non-empty if –test was given on the command line.
bool windowed
True if –windowed was given on the command line.
utils::optional< std::vector< std::string > > preprocess_defines
Defines that were given to the –preprocess option.
utils::optional< std::string > screenshot_output_file
Output file to put screenshot in.
utils::optional< int > max_fps
Max FPS specified by –max-fps option.
bool multiplayer_exit_at_end
True if –exit-at-and was given on the command line.
utils::optional< int > campaign_difficulty
Non-empty if –campaign-difficulty was given on the command line.
bool debug
True if –debug was given on the command line.
bool nosound
True if –nosound was given on the command line.
bool multiplayer
True if –multiplayer was given on the command line.
utils::optional< std::string > server
Non-empty if –server was given on the command line.
utils::optional< std::string > userdata_dir
Non-empty if –userdata-dir was given on the command line.
utils::optional< std::vector< std::pair< lg::severity, std::string > > > log
Contains parsed arguments of –log-* (e.g.
bool validcache
True if –validcache was given on the command line.
bool nomusic
True if –nomusic was given on the command line.
bool clock
True if –clock was given on the command line.
utils::optional< std::string > campaign
Non-empty if –campaign was given on the command line.
utils::optional< std::string > logdomains
Non-empty if –logdomains was given on the command line.
bool new_widgets
True if –new-widgets was given on the command line.
utils::optional< std::string > preprocess_input_macros
Non-empty if –preprocess-input-macros was given on the command line.
bool preprocess
True if –preprocess was given on the command line.
utils::optional< unsigned int > rng_seed
RNG seed specified by –rng-seed option.
utils::optional< std::vector< std::pair< unsigned int, std::string > > > multiplayer_ai_config
Non-empty if –ai-config was given on the command line.
bool data_path
True if –data-path was given on the command line.
bool version
True if –version was given on the command line.
utils::optional< std::string > multiplayer_label
Non-empty if –label was given on the command line.
utils::optional< std::string > multiplayer_era
Non-empty if –era was given on the command line.
bool fps
True if –fps was given on the command line.
utils::optional< std::string > multiplayer_turns
Non-empty if –turns was given on the command line.
utils::optional< std::string > data_dir
Non-empty if –data-dir was given on the command line.
utils::optional< std::string > preprocess_target
Target (output) path that was given to the –preprocess option.
bool campaign_skip_story
True if –skip-story was given on the command line.
bool with_replay
True if –with-replay was given on the command line.
bool screenshot
True if –screenshot was given on the command line.
bool userdata_path
True if –userdata-path was given on the command line.
bool multiplayer_ignore_map_settings
True if –ignore-map-settings was given at the command line.
utils::optional< std::string > editor
Non-empty if –editor was given on the command line.
utils::optional< std::string > preprocess_output_macros
Non-empty if –preprocess-output-macros was given on the command line.
bool fullscreen
True if –fullscreen was given on the command line.
utils::optional< std::vector< std::pair< unsigned int, std::string > > > multiplayer_controller
Non-empty if –controller was given on the command line.
utils::optional< std::vector< std::pair< unsigned int, std::string > > > multiplayer_algorithm
Non-empty if –algorithm was given on the command line.
utils::optional< std::string > preprocess_path
Path to parse that was given to the –preprocess option.
bool help
True if –help was given on the command line.
bool nocache
True if –nocache was given on the command line.
utils::optional< std::vector< std::tuple< unsigned int, std::string, std::string > > > multiplayer_parm
Non-empty if –parm was given on the command line.
utils::optional< std::string > campaign_scenario
Non-empty if –campaign-scenario was given on the command line.
utils::optional< std::string > load
Non-empty if –load was given on the command line.
BOOST_AUTO_TEST_CASE(test_empty_options)
BOOST_AUTO_TEST_SUITE(filesystem)