From ef5ea09c8a7f608af7bff5574afae672e3f0adfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 2 Nov 2016 23:22:42 +0100 Subject: test/sam: add new test cases --- sam/examples/comment-functions.cmd | 4 ++++ sam/examples/comment-functions.in | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 sam/examples/comment-functions.cmd create mode 100644 sam/examples/comment-functions.in (limited to 'sam/examples') 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; +} -- cgit v1.2.3