@@ -1888,6 +1888,27 @@ TEST_CASE_METHOD(TApp, "TomlOutputSubsubcomConfigurable", "[config]") {
18881888 CHECK (std::string::npos == str.find (" sub2.newest=true" ));
18891889}
18901890
1891+ TEST_CASE_METHOD (TApp, " TomlOutputSubcomNonConfigurable" , " [config]" ) {
1892+
1893+ app.add_flag (" --simple" );
1894+ auto subcom = app.add_subcommand (" other" , " other_descriptor" )->configurable ();
1895+ subcom->add_flag (" --newer" );
1896+
1897+ auto subcom2 = app.add_subcommand (" sub2" , " descriptor2" );
1898+ subcom2->add_flag (" --newest" )->configurable (false );
1899+
1900+ args = {" --simple" , " other" , " --newer" , " sub2" , " --newest" };
1901+ run ();
1902+
1903+ std::string str = app.config_to_str (true , true );
1904+ CHECK_THAT (str, Contains (" other_descriptor" ));
1905+ CHECK_THAT (str, Contains (" simple=true" ));
1906+ CHECK_THAT (str, Contains (" [other]" ));
1907+ CHECK_THAT (str, Contains (" newer=true" ));
1908+ CHECK_THAT (str, !Contains (" newest" ));
1909+ CHECK_THAT (str, !Contains (" descriptor2" ));
1910+ }
1911+
18911912TEST_CASE_METHOD (TApp, " TomlOutputSubsubcomConfigurableDeep" , " [config]" ) {
18921913
18931914 app.add_flag (" --simple" );
0 commit comments