| 96 | void test_word_wrapping() |
| 97 | { |
| 98 | options_description desc("Supported options"); |
| 99 | desc.add_options() |
| 100 | ("help", "this is a sufficiently long text to require word-wrapping") |
| 101 | ("prefix", value<string>()->default_value("/h/proj/tmp/dispatch"), "root path of the dispatch installation") |
| 102 | ("opt1", "this_is_a_sufficiently_long_text_to_require_word-wrapping_but_cannot_be_wrapped") |
| 103 | ("opt2", "this_is_a_sufficiently long_text_to_require_word-wrapping") |
| 104 | ("opt3", "this_is_a sufficiently_long_text_to_require_word-wrapping_but_will_not_be_wrapped") |
| 105 | ; |
| 106 | stringstream ss; |
| 107 | ss << desc; |
| 108 | BOOST_CHECK_EQUAL(ss.str(), |
| 109 | "Supported options:\n" |
| 110 | " --help this is a sufficiently long text to \n" |
| 111 | " require word-wrapping\n" |
| 112 | " --prefix arg (=/h/proj/tmp/dispatch) root path of the dispatch installation\n" |
| 113 | " --opt1 this_is_a_sufficiently_long_text_to_requ\n" |
| 114 | " ire_word-wrapping_but_cannot_be_wrapped\n" |
| 115 | " --opt2 this_is_a_sufficiently \n" |
| 116 | " long_text_to_require_word-wrapping\n" |
| 117 | " --opt3 this_is_a sufficiently_long_text_to_requ\n" |
| 118 | " ire_word-wrapping_but_will_not_be_wrappe\n" |
| 119 | " d\n" |
| 120 | ); |
| 121 | } |
| 122 | |