aboutsummaryrefslogtreecommitdiff
path: root/sam/examples
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-02 23:22:42 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-05 14:04:26 +0100
commitef5ea09c8a7f608af7bff5574afae672e3f0adfb (patch)
treed6076e53e71e67f091574507762e8a12d4a2d57d /sam/examples
parent87d4e9e152690360e9167af1d59cc9007d195f16 (diff)
downloadvis-ef5ea09c8a7f608af7bff5574afae672e3f0adfb.tar.gz
vis-ef5ea09c8a7f608af7bff5574afae672e3f0adfb.tar.xz
test/sam: add new test cases
Diffstat (limited to 'sam/examples')
-rw-r--r--sam/examples/comment-functions.cmd4
-rw-r--r--sam/examples/comment-functions.in15
2 files changed, 19 insertions, 0 deletions
diff --git a/sam/examples/comment-functions.cmd b/sam/examples/comment-functions.cmd
new file mode 100644
index 0000000..87d04c4
--- /dev/null
+++ b/sam/examples/comment-functions.cmd
@@ -0,0 +1,4 @@
+x/^static/+- g/ int / .,+/^\}/ {
+ i,#if 0\n,
+ a,\n#endif\n,
+}
diff --git a/sam/examples/comment-functions.in b/sam/examples/comment-functions.in
new file mode 100644
index 0000000..49c2452
--- /dev/null
+++ b/sam/examples/comment-functions.in
@@ -0,0 +1,15 @@
+static int addi(int a, int b) {
+ return a+b;
+}
+
+static long addl(long a, long b) {
+ return a+b;
+}
+
+static int muli(int a, int b) {
+ return a*b;
+}
+
+static long mull(long a, long b) {
+ return a*b;
+}