Lines Matching +refs:run +refs:args

14     args = {"-c"};
15 run();
22 args = {"-c"};
23 run();
34 args = {"-c"};
35 run();
38 args = {"--count"};
39 run();
42 args = {"-c", "--count"};
43 run();
61 args = {"/c"};
63 run();
73 args = {"/c"};
74 run();
84 args = {"/c"};
85 run();
92 args = {"-c"};
93 run();
99 args = {"--count"};
100 run();
110 args = {"-c", "--q", "--this", "--that"};
111 run();
135 args = {"-=", "--t\tt"};
136 run();
184 args = {"--count"};
185 run();
194 args = {"--count=7"};
195 run();
204 args = {"--count=false"};
205 run();
211 args = {"--count=0"};
212 run();
217 args = {"--count=happy"};
218 CHECK_THROWS_AS(run(), CLI::ConversionError);
224 args = {"--count", "-c", "--ncount"};
227 run();
237 args = {"--count=TRUE", "-c", "--ncount"};
238 run();
248 args = {"--ncount=happy"};
249 CHECK_THROWS_AS(run(), CLI::ConversionError);
255 args = {"--string", "mystring"};
256 run();
265 args = {"/string", "mystring"};
267 run();
286 args = {"--string=mystring"};
287 run();
296 args = {"/string:mystring"};
298 run();
431 args = {"--string"};
432 run();
441 args = {"-i"};
442 run();
445 run();
449 run();
456 args = {"-i4"};
457 run();
468 args = {"-i", "4"};
469 run();
478 run();
501 args = {"--vector=one", "--vector=two"};
502 run();
505 args = {"--string=one", "--string=two"};
506 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
515 args = {"-a", "-b", "-aA"};
516 run();
528 args = {"-7"};
529 run();
540 args = {"--7=5"};
541 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
545 CHECK_NOTHROW(run());
548 args = {"--7=7"};
549 CHECK_NOTHROW(run());
602 args = {"-:)", "--{}", "5"};
603 run();
613 args = {"--flag"};
614 run();
621 run();
632 args = {"--flag"};
634 run();
637 args = {"--flag", "12"};
638 run();
641 args.clear();
642 run();
650 args = {"-b"};
651 REQUIRE_NOTHROW(run());
654 args = {"-b", "-b"};
655 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
665 args = {
669 run();
683 args = {"-y", "32"};
685 run();
689 args = {"-y", "32.3"};
690 CHECK_THROWS_AS(run(), CLI::ConversionError);
692 args = {"-y", "-19"};
693 CHECK_THROWS_AS(run(), CLI::ConversionError);
707 args = {"-i2", "9"};
709 run();
722 args = {"--str=one", "--str=two"};
724 run();
734 args = {"--str=one", "--str=two"};
736 run();
746 args = {"--str=one", "--str=two"};
748 run();
758 args = {"--str=one", "--str=two"};
760 run();
770 args = {"--str=one", "--str=two"};
772 run();
782 args = {"--str=one", "--str=two"};
784 run();
793 args = {"--long", "1", "2", "3"};
795 run();
804 args = {"--long", "1", "2", "3"};
806 run();
817 args = {"--long", "-1", "2", "-3"};
819 CHECK_NOTHROW(run());
828 args = {"--long", "1", "2", "3"};
830 run();
839 args = {"--long", "1", "2", "3", "4"};
841 run();
851 args = {"-c"};
852 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
854 args = {"--count"};
855 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
864 args = {"-v", "2"};
865 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
867 args = {"--vals", "4"};
868 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
877 args = {"-v", "2", "3", "4"};
878 run();
881 args = {"--vals", "2", "3", "4"};
882 run();
891 args = {"--str"};
893 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
901 args = {"-s"};
903 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
911 args = {"--str"};
913 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
921 args = {"-s"};
923 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
931 args = {"--str", "one"};
933 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
935 args = {"--str", "one", "two"};
937 run();
947 args = {"-s", "one"};
949 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
951 args = {"-s", "one", "-s", "one", "-s", "one"};
953 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
960 args = {"-s", "one"};
962 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
964 args = {"-s", "one", "two", "-s", "three"};
966 REQUIRE_NOTHROW(run());
969 args = {"-s", "one", "two"};
970 REQUIRE_NOTHROW(run());
984 args = {"-O", "Test", "param1", "param2"};
985 run();
990 args = {"-OTest", "param1", "param2"};
991 run();
1006 args = {"-O", "Test", "param1"};
1007 run();
1012 args = {"param2", "-O", "Test"};
1013 CHECK_THROWS_AS(run(), CLI::ExtrasError);
1024 args = {"1", "2", "3"};
1025 run();
1030 args = {"a"};
1032 run();
1051 args = {"1", "2", "3"};
1052 run();
1058 args = {"a"};
1060 run();
1075 args = {"1", "2", "string", "3"};
1076 run();
1092 args = {"1", "param1"};
1093 run();
1098 args = {"param1", "1"};
1099 CHECK_NOTHROW(run());
1115 args = {"--option", "Test", "param1", "param2"};
1116 run();
1121 args = {"--option=Test", "param1", "param2"};
1122 run();
1133 args = {"--str"};
1134 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
1136 args = {"--str", "one", "--str", "two"};
1137 run();
1140 args = {"--str", "one", "two"};
1141 run();
1146 run();
1153 run();
1157 args = {"--str", "one", "--", "two"};
1159 run();
1163 args = {"one", "--str", "two"};
1165 run();
1169 args = {"--str", "one", "two"};
1171 run();
1181 args = {"-s"};
1182 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
1184 args = {"-s", "one", "-s", "two"};
1185 run();
1188 args = {"-s", "one", "two"};
1189 run();
1194 run();
1201 run();
1205 args = {"-s", "one", "--", "two"};
1207 run();
1211 args = {"one", "-s", "two"};
1213 run();
1223 args = {"one", "-s", "two", "three", "--", "four"};
1225 run();
1238 args = {"--str", "one", "two", "three"};
1239 run();
1244 args = {"two", "three", "--str", "one", "four"};
1245 run();
1258 args = {"-s", "one", "two", "three"};
1259 run();
1264 args = {"two", "three", "-s", "one", "four"};
1265 run();
1276 args = {"--str", "one"};
1278 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
1286 args = {"-s", "one"};
1288 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
1295 CHECK_THROWS_AS(run(), CLI::RequiredError);
1297 args = {"-a"};
1298 CHECK_THROWS_AS(run(), CLI::RequiredError);
1300 args = {"-b"};
1301 CHECK_THROWS_AS(run(), CLI::RequiredError);
1303 args = {"-a", "-b"};
1304 run();
1315 run();
1318 args = {"-v"};
1319 run();
1322 args = {"-vv"};
1323 run();
1336 run();
1339 args = {"-f"};
1340 run();
1343 args = {"-vfv"};
1344 run();
1347 args = {"--fval"};
1348 run();
1351 args = {"--fval=2"};
1352 run();
1365 run();
1368 args = {"-f"};
1369 run();
1372 args = {"-vfv"};
1373 run();
1376 args = {"--fval"};
1377 run();
1380 args = {"--fval=2"};
1381 run();
1396 run();
1399 args = {"-v"};
1400 run();
1403 args = {"-vv"};
1404 run();
1418 args = {"thing1", "thing2"};
1420 run();
1433 args = {"--one", "two", "three"};
1434 run();
1439 args = {"--", "--one", "two", "three"};
1441 run();
1454 args = {"--posit2", "thing2", "7"};
1456 run();
1468 args = {"one"};
1470 run();
1471 CHECK(vec == args);
1473 args = {"one", "two"};
1474 run();
1476 CHECK(vec == args);
1485 args = {"--simple", "--double", "1.2"};
1487 run();
1498 run();
1512 args = {"--two"};
1514 CHECK_THROWS_AS(run(), CLI::ExtrasError);
1526 args = {"--two"};
1528 run();
1540 args = {"--two"};
1542 run(); // Mostly hoping it does not crash
1551 args = {"--file", myfile};
1553 run();
1558 CHECK_THROWS_AS(run(), CLI::ValidationError);
1561 CHECK_NOTHROW(run());
1572 args = {"--file", myfile};
1574 CHECK_THROWS_AS(run(), CLI::ValidationError);
1578 run();
1591 args = {"--file", myfile};
1593 CHECK_NOTHROW(run());
1597 CHECK_THROWS_AS(run(), CLI::ValidationError);
1608 args = {};
1609 run();
1627 args = {"-a", "1", "-b", "2", "-a3", "-a", "4"};
1629 run();
1641 run();
1643 args = {"-s"};
1644 run();
1646 args = {"-s", "--both"};
1647 run();
1649 args = {"--both"};
1650 CHECK_THROWS_AS(run(), CLI::RequiresError);
1659 run();
1661 args = {"-s"};
1662 run();
1664 args = {"--nostr"};
1665 run();
1667 args = {"--nostr", "-s"};
1668 CHECK_THROWS_AS(run(), CLI::ExcludesError);
1670 args = {"--string", "--nostr"};
1671 CHECK_THROWS_AS(run(), CLI::ExcludesError);
1682 run();
1684 args = {"--no"};
1685 run();
1687 args = {"--opt2"};
1688 run();
1690 args = {"--no", "--opt1"};
1691 CHECK_THROWS_AS(run(), CLI::ExcludesError);
1693 args = {"--no", "--opt2"};
1694 CHECK_THROWS_AS(run(), CLI::ExcludesError);
1703 run();
1705 args = {"--opt1"};
1706 run();
1708 args = {"--opt2"};
1709 run();
1711 args = {"--optall"};
1712 CHECK_THROWS_AS(run(), CLI::RequiresError);
1714 args = {"--optall", "--opt1"};
1715 CHECK_THROWS_AS(run(), CLI::RequiresError);
1717 args = {"--optall", "--opt2", "--opt1"};
1718 CHECK_THROWS_AS(run(), CLI::RequiresError);
1720 args = {"--optall", "--opt1", "--opt2", "--opt3"};
1721 run();
1730 run();
1732 args = {"--opt1"};
1733 run();
1735 args = {"--opt2"};
1736 run();
1738 args = {"--optall"};
1739 CHECK_THROWS_AS(run(), CLI::RequiresError);
1741 args = {"--optall", "--opt1"};
1742 CHECK_THROWS_AS(run(), CLI::RequiresError);
1744 args = {"--optall", "--opt2", "--opt1"};
1745 CHECK_THROWS_AS(run(), CLI::RequiresError);
1747 args = {"--optall", "--opt1", "--opt2", "--opt3"};
1748 run();
1756 run();
1758 args = {"--opt1"};
1759 run();
1761 args = {"--opt2"};
1762 CHECK_THROWS_AS(run(), CLI::RequiresError);
1764 args = {"--opt3"};
1765 CHECK_THROWS_AS(run(), CLI::RequiresError);
1767 args = {"--opt3", "--opt2"};
1768 CHECK_THROWS_AS(run(), CLI::RequiresError);
1770 args = {"--opt3", "--opt1"};
1771 CHECK_THROWS_AS(run(), CLI::RequiresError);
1773 args = {"--opt2", "--opt1"};
1774 run();
1776 args = {"--opt1", "--opt2", "--opt3"};
1777 run();
1787 run();
1793 run();
1796 CHECK_THROWS_AS(run(), CLI::RequiredError);
1807 run();
1813 run();
1816 CHECK_THROWS_AS(run(), CLI::RequiredError);
1823 args = {"--one=1"};
1824 CHECK_THROWS_AS(run(), CLI::ValidationError);
1826 args = {"--one=7"};
1827 CHECK_THROWS_AS(run(), CLI::ValidationError);
1829 args = {"--one=3"};
1830 run();
1832 args = {"--one=5"};
1833 run();
1835 args = {"--one=6"};
1836 run();
1845 args = {"--one=1"};
1846 CHECK_THROWS_AS(run(), CLI::ValidationError);
1848 args = {"--one=7"};
1849 CHECK_THROWS_AS(run(), CLI::ValidationError);
1851 args = {"--one=3"};
1852 run();
1854 args = {"--one=5"};
1855 run();
1857 args = {"--one=6"};
1858 run();
1866 args = {"--one=1"};
1867 CHECK_NOTHROW(run());
1869 args = {"--one=-7"};
1870 CHECK_THROWS_AS(run(), CLI::ValidationError);
1872 args = {"--one=error"};
1873 CHECK_THROWS_AS(run(), CLI::ValidationError);
1875 args = {"--one=4.568"};
1876 CHECK_THROWS_AS(run(), CLI::ValidationError);
1887 args = {"-x", "-f"};
1889 REQUIRE_NOTHROW(run());
1898 args = {"-x", "-f"};
1899 REQUIRE_NOTHROW(run());
1912 args = {"-x", "45", "-f", "27"};
1913 REQUIRE_NOTHROW(run());
1931 args = {"-x", "45", "-f", "27"};
1939 args = {"-x", "45", "-f", "27"};
1940 REQUIRE_NOTHROW(run());
1960 args = {"27", "-f", "45", "-x"};
1961 app.parse(args);
1962 CHECK(std::vector<std::string>({"45", "-x"}) == args);
1968 capp.parse(args);
1975 args = {"--two"};
1977 …CHECK_THROWS_AS(CLI::detail::AppFriend::parse_arg(&app, args, CLI::detail::Classifier::SHORT), CLI…
1982 args = {"-t"};
1984 …CHECK_THROWS_AS(CLI::detail::AppFriend::parse_arg(&app, args, CLI::detail::Classifier::LONG), CLI:…
1989 args = {"-t"};
1991 …CHECK_THROWS_AS(CLI::detail::AppFriend::parse_arg(&app, args, CLI::detail::Classifier::WINDOWS_STY…
1997 args = {"-t"};
1999 …CHECK_THROWS_AS(CLI::detail::AppFriend::parse_arg(&app, args, CLI::detail::Classifier::NONE), CLI:…
2004 args = {"subcom"};
2006 CHECK_THROWS_AS(CLI::detail::AppFriend::parse_subcommand(&app, args), CLI::HorribleError);
2038 args = {"-a1", "-a2"};
2040 CHECK_THROWS_AS(run(), CLI::ArgumentMismatch);
2050 args = {"-mone", "-mtwo"};
2052 run();
2062 REQUIRE_NOTHROW(run());
2064 args = {"-mone"};
2066 REQUIRE_THROWS_AS(run(), CLI::ValidationError);
2069 run();
2085 args = {"--vec", "one", "two", "three"};
2087 run();
2097 args = {"--entry", "key1", "value1", "--entry", "key2", "value2"};
2098 REQUIRE_NOTHROW(run());
2101 args.pop_back();
2102 REQUIRE_THROWS_AS(run(), CLI::ArgumentMismatch);
2110 args = {"--each", "that"};
2111 run();
2121 args = {"--each", "that"};
2122 run();
2129 args = {"extra"};
2130 CHECK_THROWS_AS(run(), CLI::ExtrasError);
2132 args = {"-a", "extra"};
2133 CHECK_THROWS_AS(run(), CLI::Success);
2135 args = {"-b", "extra"};
2136 CHECK_THROWS_AS(run(), CLI::CallForHelp);
2139 args = {"-a", "-b", "extra"};
2140 CHECK_THROWS_AS(run(), CLI::Success);
2151 args = {"--idx", "1,2,3"};
2153 run();
2163 run();
2171 args = {"--idx", "1 2 3", "4 5 6"};
2173 run();
2176 run();
2186 args = {"--idx", "1,2,3"};
2188 CHECK_THROWS_AS(run(), CLI::ConversionError);
2195 args = {"--idx", "1,2,"};
2197 run();
2203 run();
2210 args = {"--idx", "1,2,3"};
2213 run();
2221 args = {"--idx", "1,2,3"};
2223 run();
2226 run();
2229 run();
2237 args = {"--idx",
2242 run();
2247 run();
2255 args = {"--idx", "1, 2"};
2257 run();
2263 run();
2271 args = {"this", "is", "a", "test"};
2273 run();
2277 args = {"this", "is", "a", "test"};
2279 run();
2290 args = {"-v", "-vv", "-vvv"};
2305 run();