aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/lexer.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-01-20 20:25:59 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-24 14:53:00 +0300
commit28106f96de8ae5cdb3a0ee0e3a8a8185551e3b00 (patch)
tree8b912a7c9a2bd2ba1263695428d8343d022953a5 /build2/test/script/lexer.cxx
parenteeed734583c2f553e71ae0bd78a4b6e7e4d9cc2b (diff)
Add support for comparison of test command output to a file
Diffstat (limited to 'build2/test/script/lexer.cxx')
-rw-r--r--build2/test/script/lexer.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/build2/test/script/lexer.cxx b/build2/test/script/lexer.cxx
index ba3f1ae..d0d59aa 100644
--- a/build2/test/script/lexer.cxx
+++ b/build2/test/script/lexer.cxx
@@ -354,13 +354,13 @@ namespace build2
type r (type::in_str);
xchar p (peek ());
- if (p == '+' || p == '-' || p == '<')
+ if (p == '|' || p == '-' || p == '<')
{
get ();
switch (p)
{
- case '+': return make_token (type::in_pass);
+ case '|': return make_token (type::in_pass);
case '-': return make_token (type::in_null);
case '<':
{
@@ -395,15 +395,18 @@ namespace build2
type r (type::out_str);
xchar p (peek ());
- if (p == '+' || p == '-' || p == '&' || p == '>')
+ if (p == '|' || p == '-' || p == '&' ||
+ p == '=' || p == '+' || p == '>')
{
get ();
switch (p)
{
- case '+': return make_token (type::out_pass);
+ case '|': return make_token (type::out_pass);
case '-': return make_token (type::out_null);
case '&': return make_token (type::out_merge);
+ case '=': return make_token (type::out_file_ovr);
+ case '+': return make_token (type::out_file_app);
case '>':
{
r = type::out_doc;
@@ -412,7 +415,7 @@ namespace build2
if (p == '>')
{
get ();
- r = type::out_file;
+ r = type::out_file_cmp;
}
break;
}
@@ -427,7 +430,6 @@ namespace build2
{
case type::out_str:
case type::out_doc: mods = ":/~"; stop = "~"; break;
- case type::out_file: mods = "&"; break;
}
return make_token_with_modifiers (r, mods, stop);