aboutsummaryrefslogtreecommitdiff
path: root/tests/compiler/sloc-counter/testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-15 22:47:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-17 15:20:17 +0300
commitbe095014187fbe40e91e6b45166e9f2b3530123a (patch)
tree74aa4e3f342ab2f0222cea00c13237ab31338864 /tests/compiler/sloc-counter/testscript
parente8a09d9833d67a40c43e4de1d578551cc9020cb7 (diff)
Add support for build2 for tests
Diffstat (limited to 'tests/compiler/sloc-counter/testscript')
-rw-r--r--tests/compiler/sloc-counter/testscript46
1 files changed, 46 insertions, 0 deletions
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 <iostream>
+
+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