X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FConsole%2FParse.test.cc;h=fd15211d9439851416f508a4cbf6b0b6a23db3c2;hb=164fe477094d42463722584e527a02379ab5d985;hp=5d625e336558f340ac2fc3d747d1e0eb83cfb5b6;hpb=92f8630b75f3ef50e73c48cde58645dcd1534e27;p=senf.git diff --git a/Utils/Console/Parse.test.cc b/Utils/Console/Parse.test.cc index 5d625e3..fd15211 100644 --- a/Utils/Console/Parse.test.cc +++ b/Utils/Console/Parse.test.cc @@ -66,6 +66,10 @@ namespace { os_ << "builtin_cd( " << senf::stringJoin(path, "/") << " )\n"; } void builtin_ls(std::vector const & path) { os_ << "builtin_ls( " << senf::stringJoin(path, "/") << " )\n"; } + void builtin_ll(std::vector const & path) + { os_ << "builtin_ll( " << 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 +137,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 );