Skip to content
Snippets Groups Projects
Commit 05bb823c authored by Axel Naumann's avatar Axel Naumann
Browse files

Require ">" after ".5" to accept it as redirection (ROOT-8696).

parent d2e0c7a5
No related branches found
No related tags found
No related merge requests found
...@@ -185,7 +185,7 @@ namespace cling { ...@@ -185,7 +185,7 @@ namespace cling {
// Default redirect is stdout. // Default redirect is stdout.
MetaProcessor::RedirectionScope stream = MetaProcessor::kSTDOUT; 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 // > or 1> the redirection is for stdout stream
// 2> redirection for stderr stream // 2> redirection for stderr stream
constant_FD = getCurTok().getConstant(); constant_FD = getCurTok().getConstant();
......
...@@ -19,6 +19,9 @@ static void setup() { ...@@ -19,6 +19,9 @@ static void setup() {
} }
setup(); setup();
// ROOT-8696
.5 //CHECKOUT: (double) 0.500000
.2>&1 .2>&1
std::cerr << "Error into stdout.\n"; std::cerr << "Error into stdout.\n";
//CHECKOUT: Error into stdout. //CHECKOUT: Error into stdout.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment