diff --git a/roottest/cling/other/CMakeLists.txt b/roottest/cling/other/CMakeLists.txt index e7607efe1e80b..35ec0b06bbc25 100644 --- a/roottest/cling/other/CMakeLists.txt +++ b/roottest/cling/other/CMakeLists.txt @@ -46,6 +46,13 @@ ROOTTEST_ADD_TEST(execValuePrint OUTREF execValuePrint.ref LABELS roottest regression cling) +ROOT_EXECUTABLE(testNameEndingWithcl testNameEndingWithcl.cxx LIBRARIES Core) +ROOTTEST_ADD_TEST(testNameEndingWithcl + EXEC ./testNameEndingWithcl + FAILREGEX "unknown argument" + LABELS roottest regression cling) +ROOT_SET_OUTPUT_DIRECTORIES(testNameEndingWithcl) + if(MSVC) set(ERREF_FILE checkMissingSymbolExitCode_win32.eref) else() @@ -72,4 +79,4 @@ if(NOT MSVC) COPY_TO_BUILDDIR dupSymJIT.h DEPENDS dupSymJIT LABELS roottest regression cling) -endif() \ No newline at end of file +endif() diff --git a/roottest/cling/other/testNameEndingWithcl.cxx b/roottest/cling/other/testNameEndingWithcl.cxx new file mode 100644 index 0000000000000..d5ea7cc3c61d9 --- /dev/null +++ b/roottest/cling/other/testNameEndingWithcl.cxx @@ -0,0 +1,8 @@ +// Regression test for https://github.com/root-project/root/issues/23493 +#include + +int main() { + // this causes ROOT to be initialized + gROOT; + return 0; +}