X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FParse.test.cc;h=810344e4a379ce542a971db05d98acda84cb54d2;hb=4101c2b818ec67e7469ebb44f030eed2185c4ab0;hp=27f169771da4248358c69a2a749f3e2c862a1029;hpb=9cb871b939efe93e35dd96808d25089399acfc46;p=senf.git diff --git a/senf/Utils/Console/Parse.test.cc b/senf/Utils/Console/Parse.test.cc index 27f1697..810344e 100644 --- a/senf/Utils/Console/Parse.test.cc +++ b/senf/Utils/Console/Parse.test.cc @@ -39,7 +39,7 @@ #include #define prefix_ -///////////////////////////////cc.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// namespace { @@ -97,7 +97,7 @@ SENF_AUTO_UNIT_TEST(commandGrammar) " x\"01 02 # Inner comment\n" " 0304\";"; - BOOST_CHECK( boost::spirit::parse( + BOOST_CHECK( senf::console::detail::boost_spirit::parse( text, grammar.use_parser(), grammar.use_parser() ) . full ); @@ -127,16 +127,16 @@ SENF_AUTO_UNIT_TEST(commandGrammar) { ss.str(""); - BOOST_CHECK( boost::spirit::parse( - "ls //foo/bar;", + BOOST_CHECK( senf::console::detail::boost_spirit::parse( + "ls //foo/\"bar\";", grammar.use_parser(), grammar.use_parser() ) . full ); - BOOST_CHECK_EQUAL( ss.str(), "builtin_ls( None('')/Word('foo')/Word('bar') )\n" ); + BOOST_CHECK_EQUAL( ss.str(), "builtin_ls( None('')/Word('foo')/BasicString('bar') )\n" ); } { ss.str(""); - BOOST_CHECK( boost::spirit::parse( + BOOST_CHECK( senf::console::detail::boost_spirit::parse( "lr /foo/bar;", grammar.use_parser(), grammar.use_parser() ) . full ); @@ -145,7 +145,7 @@ SENF_AUTO_UNIT_TEST(commandGrammar) { ss.str(""); - BOOST_CHECK( boost::spirit::parse( + BOOST_CHECK( senf::console::detail::boost_spirit::parse( "cd /foo/bar;", grammar.use_parser(), grammar.use_parser() ) . full ); @@ -154,7 +154,7 @@ SENF_AUTO_UNIT_TEST(commandGrammar) { ss.str(""); - BOOST_CHECK( boost::spirit::parse( + BOOST_CHECK( senf::console::detail::boost_spirit::parse( "exit;", grammar.use_parser(), grammar.use_parser() ) . full ); @@ -163,19 +163,19 @@ SENF_AUTO_UNIT_TEST(commandGrammar) { ss.str(""); - BOOST_CHECK( boost::spirit::parse( - "foo/bar// {", + BOOST_CHECK( senf::console::detail::boost_spirit::parse( + "foo/\"bar baz\"// {", grammar.use_parser(), grammar.use_parser() ) . full ); BOOST_CHECK_EQUAL( ss.str(), - "beginCommand( Word('foo')/Word('bar')/None('') )\n" + "beginCommand( Word('foo')/BasicString('bar baz')/None('') )\n" "pushDirectory()\n" "endCommand()\n" ); } { ss.str(""); - BOOST_CHECK( boost::spirit::parse( + BOOST_CHECK( senf::console::detail::boost_spirit::parse( "}", grammar.use_parser(), grammar.use_parser() ) . full ); @@ -184,7 +184,7 @@ SENF_AUTO_UNIT_TEST(commandGrammar) { ss.str(""); - BOOST_CHECK( boost::spirit::parse( + BOOST_CHECK( senf::console::detail::boost_spirit::parse( "help /foo/bar", grammar.use_parser(), grammar.use_parser() ) . full ); @@ -355,13 +355,13 @@ SENF_AUTO_UNIT_TEST(parseExceptions) CheckParseEx( "/foo/bar;\n ()", "path expected\nat :2:3" ); CheckParseEx( "cd /foo/bar foo/bar", "end of statement expected\nat :1:13" ); CheckParseEx( "/foo/bar foo /", "end of statement expected\nat :1:14" ); - CheckParseEx( "cd \"foo\"", "path expected\nat :1:4" ); + CheckParseEx( "cd (foo)", "path expected\nat :1:4" ); CheckParseEx( "/foo/bar \"string", "'\"' expected\nat :1:17" ); CheckParseEx( "/foo/bar x\"hi\"", "'\"' expected\nat :1:12" ); CheckParseEx( "/foo/bar (", "')' expected\nat :1:11" ); } -///////////////////////////////cc.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// #undef prefix_