diff --git a/interpreter/cling/lib/MetaProcessor/MetaParser.cpp b/interpreter/cling/lib/MetaProcessor/MetaParser.cpp index ae63450706fae1c35ac654629b62e38b56091d6f..c39d146bed104b0ad9df4ab418b439070b66fe5f 100644 --- a/interpreter/cling/lib/MetaProcessor/MetaParser.cpp +++ b/interpreter/cling/lib/MetaProcessor/MetaParser.cpp @@ -185,7 +185,7 @@ namespace cling { // Default redirect is stdout. MetaProcessor::RedirectionScope stream = MetaProcessor::kSTDOUT; - if (getCurTok().is(tok::constant)) { + if (getCurTok().is(tok::constant) && lookAhead(1).is(tok::greater)) { // > or 1> the redirection is for stdout stream // 2> redirection for stderr stream constant_FD = getCurTok().getConstant(); diff --git a/interpreter/cling/test/Prompt/OutputRedirect.C b/interpreter/cling/test/Prompt/OutputRedirect.C index 816243c73eeda603a3ec19a9933f8f0e89f79a05..1ddb1f1ac80e32359934aa615e7719e2c1b09805 100644 --- a/interpreter/cling/test/Prompt/OutputRedirect.C +++ b/interpreter/cling/test/Prompt/OutputRedirect.C @@ -19,6 +19,9 @@ static void setup() { } setup(); +// ROOT-8696 +.5 //CHECKOUT: (double) 0.500000 + .2>&1 std::cerr << "Error into stdout.\n"; //CHECKOUT: Error into stdout.