aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/lexer/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-22 11:59:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:34 +0200
commit31e16a7413813293e3cccb6799eaa08b7af5af4e (patch)
tree45f06abbcf44652b58c3a2ad7485f64108994abd /unit-tests/test/script/lexer/driver.cxx
parent8e3a8ffa6579a51f5a9351e1b99c07d3e1fbd234 (diff)
Implement support for compound tests
Diffstat (limited to 'unit-tests/test/script/lexer/driver.cxx')
-rw-r--r--unit-tests/test/script/lexer/driver.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/unit-tests/test/script/lexer/driver.cxx b/unit-tests/test/script/lexer/driver.cxx
index cd7110f..e37e29d 100644
--- a/unit-tests/test/script/lexer/driver.cxx
+++ b/unit-tests/test/script/lexer/driver.cxx
@@ -42,9 +42,12 @@ namespace build2
{
cin.exceptions (istream::failbit | istream::badbit);
- // The variable mode auto-expires so we need something underneath.
+ // Some modes auto-expire so we need something underneath.
//
- bool u (m == lexer_mode::variable);
+ bool u (m == lexer_mode::assign_line ||
+ m == lexer_mode::variable_line ||
+ m == lexer_mode::variable);
+
lexer l (cin, path ("stdin"), u ? lexer_mode::script_line : m);
if (u)
l.mode (m);