From be095014187fbe40e91e6b45166e9f2b3530123a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 15 Nov 2016 22:47:30 +0300 Subject: Add support for build2 for tests --- tests/compiler/sloc-counter/testscript | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/compiler/sloc-counter/testscript (limited to 'tests/compiler/sloc-counter/testscript') diff --git a/tests/compiler/sloc-counter/testscript b/tests/compiler/sloc-counter/testscript new file mode 100644 index 0000000..802d406 --- /dev/null +++ b/tests/compiler/sloc-counter/testscript @@ -0,0 +1,46 @@ +# file : tests/compiler/sloc-counter/testscript +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +: c++-program-sloc +: +text = '// C++ comment + // C++ comment + +/* C comment */ + +/* Multiline + C + Comment + + +*/ + +#include + +char str[] = "multi\ +line\ +string\ +literal"; + +using namespace std; + + +int main( + int argc /*count*/, + char* argv[] /*array*/) +{ + /* comment start */ int x = 0; + char* s = + /* comment start */"foo"; + int y = 2 + /* tricky stuff *// + 2; + cerr << "Hello, \"world!" << '"'\\''"' << endl; +}'; +cat <"$text" >>>file; +$* file >>EOO +$text + +18 +EOO -- cgit v1.1