diff options
Diffstat (limited to 'test/sam/examples')
| -rw-r--r-- | test/sam/examples/comment-functions.cmd | 4 | ||||
| -rw-r--r-- | test/sam/examples/comment-functions.in | 15 | ||||
| -rw-r--r-- | test/sam/examples/delete-empty-lines.cmd | 1 | ||||
| -rw-r--r-- | test/sam/examples/delete-empty-lines.in | 17 | ||||
| -rw-r--r-- | test/sam/examples/swap-words.cmd | 4 | ||||
| -rw-r--r-- | test/sam/examples/swap-words.in | 1 |
6 files changed, 42 insertions, 0 deletions
diff --git a/test/sam/examples/comment-functions.cmd b/test/sam/examples/comment-functions.cmd new file mode 100644 index 0000000..87d04c4 --- /dev/null +++ b/test/sam/examples/comment-functions.cmd @@ -0,0 +1,4 @@ +x/^static/+- g/ int / .,+/^\}/ { + i,#if 0\n, + a,\n#endif\n, +} diff --git a/test/sam/examples/comment-functions.in b/test/sam/examples/comment-functions.in new file mode 100644 index 0000000..49c2452 --- /dev/null +++ b/test/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; +} diff --git a/test/sam/examples/delete-empty-lines.cmd b/test/sam/examples/delete-empty-lines.cmd new file mode 100644 index 0000000..04b3459 --- /dev/null +++ b/test/sam/examples/delete-empty-lines.cmd @@ -0,0 +1 @@ +x g/^$/ d diff --git a/test/sam/examples/delete-empty-lines.in b/test/sam/examples/delete-empty-lines.in new file mode 100644 index 0000000..a82e316 --- /dev/null +++ b/test/sam/examples/delete-empty-lines.in @@ -0,0 +1,17 @@ + +1 + +2 + + +3 + + + +4 + + + + +5 + diff --git a/test/sam/examples/swap-words.cmd b/test/sam/examples/swap-words.cmd new file mode 100644 index 0000000..43bbde6 --- /dev/null +++ b/test/sam/examples/swap-words.cmd @@ -0,0 +1,4 @@ +,x/(Emacs|vi)/{ + g/Emacs/ v/....../ c/vi/ + g/vi/ v/.../ c/Emacs/ +} diff --git a/test/sam/examples/swap-words.in b/test/sam/examples/swap-words.in new file mode 100644 index 0000000..bfdc4fc --- /dev/null +++ b/test/sam/examples/swap-words.in @@ -0,0 +1 @@ +Emacs is better than vi.
\ No newline at end of file |
