From b0b048c03930b826ab3dbf88b56fd664fca26886 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 22 May 2020 15:32:31 +0300 Subject: Add script command redirect aliases --- libbuild2/script/lexer.test.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libbuild2/script/lexer.test.cxx') diff --git a/libbuild2/script/lexer.test.cxx b/libbuild2/script/lexer.test.cxx index 24fe335..b8de241 100644 --- a/libbuild2/script/lexer.test.cxx +++ b/libbuild2/script/lexer.test.cxx @@ -37,7 +37,17 @@ namespace build2 cin.exceptions (istream::failbit | istream::badbit); path_name in (""); - lexer l (cin, in, m); + + using type = token_type; + + redirect_aliases ra {type (type::in_file), + type (type::in_doc), + type (type::in_str), + type (type::out_file_ovr), + type (type::out_file_app), + nullopt}; + + lexer l (cin, in, m, ra); // No use printing eos since we will either get it or loop forever. // -- cgit v1.1