diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-10-13 13:08:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-04 08:29:23 +0200 |
commit | 5381b25c51475c0c7a2f39e9f6efa623f621ef3e (patch) | |
tree | 634110f6d81fea2d67f13564a26030f088c154bc /build2/test/script/script | |
parent | 18ce15f3aee71debe3f35356c6a739943815da8a (diff) |
Continue work on testscript parser
Diffstat (limited to 'build2/test/script/script')
-rw-r--r-- | build2/test/script/script | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/build2/test/script/script b/build2/test/script/script index de81fa6..cda4feb 100644 --- a/build2/test/script/script +++ b/build2/test/script/script @@ -18,6 +18,45 @@ namespace build2 { namespace script { + enum class redirect_type + { + none, + null, + here_string, // Value is the string. + here_document // Value is the document. + }; + + struct redirect + { + redirect_type type = redirect_type::none; + string value; + }; + + struct command + { + path program; + strings arguments; + + redirect in; + redirect out; + redirect err; + }; + + enum class exit_comparison {eq, ne}; + + struct command_exit + { + // @@ Need to understand what type we should use for status. + + exit_comparison comparison = exit_comparison::eq; + uint16_t status = 0; + }; + + struct test: command + { + command_exit exit; + }; + class script { public: |