aboutsummaryrefslogtreecommitdiff
path: root/tests/compiler/sloc-counter/testscript
diff options
context:
space:
mode:
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