X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FConsole%2FParse.test.cc;h=bbc2c686afc6220335325f5b4d3691be96631f30;hb=6927c87144ca23845065e3c23e37c75f5f059cf3;hp=5d625e336558f340ac2fc3d747d1e0eb83cfb5b6;hpb=92f8630b75f3ef50e73c48cde58645dcd1534e27;p=senf.git diff --git a/Utils/Console/Parse.test.cc b/Utils/Console/Parse.test.cc index 5d625e3..bbc2c68 100644 --- a/Utils/Console/Parse.test.cc +++ b/Utils/Console/Parse.test.cc @@ -66,6 +66,8 @@ namespace { os_ << "builtin_cd( " << senf::stringJoin(path, "/") << " )\n"; } void builtin_ls(std::vector const & path) { os_ << "builtin_ls( " << senf::stringJoin(path, "/") << " )\n"; } + void builtin_lr(std::vector const & path) + { os_ << "builtin_lr( " << senf::stringJoin(path, "/") << " )\n"; } void builtin_exit() { os_ << "builtin_exit()\n"; } void builtin_help(std::vector const & path) @@ -133,6 +135,15 @@ BOOST_AUTO_UNIT_TEST(commandGrammar) { ss.str(""); BOOST_CHECK( boost::spirit::parse( + "lr /foo/bar;", + grammar.use_parser(), + grammar.use_parser() ) . full ); + BOOST_CHECK_EQUAL( ss.str(), "builtin_lr( None('')/Word('foo')/Word('bar') )\n" ); + } + + { + ss.str(""); + BOOST_CHECK( boost::spirit::parse( "cd /foo/bar;", grammar.use_parser(), grammar.use_parser() ) . full );