Browse Source

*converter: don't exit --info right after Doxygen config snippet marker.

With the following invocation

    magnum-sceneconverter --info-importer -I GltfImporter \
        -i customSceneFieldTypes/foo=Int

the newly-added option wasn't visible in the configuration printout
because the printer exited right once encountering the Doxygen
[configuration_] snippet marker in the file, and the option got added
after it. Now it's continuing after the marker and the newly-added
option is visible.
pull/596/head
Vladimír Vondruš 4 years ago
parent
commit
7f4458182e
  1. 11
      src/Magnum/Trade/Implementation/converterUtilities.h
  2. 7
      src/Magnum/Trade/Test/ImageConverterImplementationTest.cpp

11
src/Magnum/Trade/Implementation/converterUtilities.h

@ -95,12 +95,11 @@ void printPluginConfigurationInfo(Debug& d, const Utility::ConfigurationGroup& c
d << Debug::resetColor; d << Debug::resetColor;
} else { } else {
/* Configuration contents are delimited by these markers in order /* Configuration contents are delimited by these markers in order
to include them in Doxygen-generated docs. If we reach them, to include them in Doxygen-generated docs. Newly added values
it's the end of the (public) configuration values. Don't print will however appear *after* these markers so we can't just
them, don't print even the last newline, and exit. */ return here. */
if(i.second() == "# [configuration_]"_s) { if(i.second() == "# [configuration_]"_s)
return; continue;
}
/* Print leading space only if there's actually something */ /* Print leading space only if there's actually something */
d << Debug::newline; d << Debug::newline;

7
src/Magnum/Trade/Test/ImageConverterImplementationTest.cpp

@ -253,7 +253,8 @@ void ImageConverterImplementationTest::pluginConfigurationInfoDoxygenDelimiter()
# A comment # A comment
value=yes value=yes
# [configuration_] # [configuration_]
privateValue=SECRET
newlyAddedValue=42
)"; )";
Utility::Configuration conf{in}; Utility::Configuration conf{in};
@ -265,7 +266,9 @@ privateValue=SECRET
CORRADE_COMPARE(out.str(), CORRADE_COMPARE(out.str(),
"Configuration:\n" "Configuration:\n"
" # A comment\n" " # A comment\n"
" value=yes\n"); " value=yes\n"
"\n"
" newlyAddedValue=42\n");
} }
void ImageConverterImplementationTest::importerInfo() { void ImageConverterImplementationTest::importerInfo() {

Loading…
Cancel
Save