diff options
Diffstat (limited to 'unit-tests/test/script/lexer/driver.cxx')
-rw-r--r-- | unit-tests/test/script/lexer/driver.cxx | 7 |
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); |