allow change of aql execution result from inside
Showing
- alib2cli/src/command/QuitCommand.h 8 additions, 2 deletionsalib2cli/src/command/QuitCommand.h
- alib2cli/src/environment/Environment.h 25 additions, 3 deletionsalib2cli/src/environment/Environment.h
- alib2cli/src/parser/Parser.cpp 13 additions, 3 deletionsalib2cli/src/parser/Parser.cpp
- aql2/src/aql.cpp 1 addition, 1 deletionaql2/src/aql.cpp
- aql2/src/prompt/Prompt.h 4 additions, 0 deletionsaql2/src/prompt/Prompt.h
Loading
-
Jak tohle muzu pouzit? Rekneme ze mam neco takoveho:
cli::Environment environment; for ( const std::string & q : queries ) { cli::Parser parser = cli::Parser ( cli::Lexer ( q ) ); cli::Command::Result cliresult = parser.parse ( ) -> run ( environment ); EXPECT_EQ ( cliresult, cli::Command::Result::OK ); } EXPECT_EQ ( environment.getResult ( ), 1 );
V
queries
je neco jako:{ "execute randautomaton", "compare::AutomatonCompare <(neco) <(neco)" }
. Chtel bych zkontrolovat, zecompare::AutomatonCompare
vratilo1
, ale podle testu to vraci0
. -
To ze to na result=
true
vraci0
je kompatibilita kvuli bashi?$ ./aql2 -q "execute RandomAutomatonFactory 2 2 true 2 > \$x" -q "execute RandomAutomatonFactory 3 2 true 2 >\$y" -q "quit compare::AutomatonCompare \$x \$x" ; echo $? 0 tomas@enterprise /media/data/zdrojaky/alt/automata-library/release/aql2 (dev-tp) $ ./aql2 -q "execute RandomAutomatonFactory 2 2 true 2 > \$x" -q "execute RandomAutomatonFactory 3 2 true 2 >\$y" -q "quit compare::AutomatonCompare \$x \$y" ; echo $? 1
Please register or sign in to comment