vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 483551baf99fca342a107d43c68acb30dce371b3
parent b6bd913a43e702761d09f1eeb5be59bb708ad812
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu,  2 Feb 2017 13:43:34 +0100

test/sam: add more tests

Diffstat:
Msam/addresses/columns.cmd | 5++++-
Asam/addresses/first-last.cmd | 4++++
Asam/addresses/first-last.in | 4++++
Asam/addresses/second.cmd | 4++++
Asam/addresses/second.in | 4++++
Asam/commands/group.cmd | 5+++++
Asam/commands/group.in | 1+
Asam/commands/long-text.cmd | 11+++++++++++
Asam/commands/long-text.in | 0
Asam/commands/pipe-out.cmd | 5+++++
Asam/commands/pipe-out.in | 1+
Asam/commands/repeated-shell.cmd | 2++
Asam/commands/repeated-shell.in | 2++
Asam/errors/conflict.cmd | 4++++
Asam/errors/conflict.in | 1+
Asam/errors/filter.cmd | 1+
Asam/errors/filter.in | 1+
Asam/errors/filter.ref | 1+
Asam/errors/pipe-in.cmd | 1+
Asam/errors/pipe-in.in | 1+
Asam/errors/pipe-in.ref | 1+
Asam/errors/read.cmd | 1+
Asam/errors/read.in | 1+
Asam/errors/unbalanced-group.cmd | 5+++++
Asam/errors/unbalanced-group.in | 1+
25 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/sam/addresses/columns.cmd b/sam/addresses/columns.cmd @@ -1 +1,4 @@ -,x/def/ -/^/+#10 i/|/ +,x/def|uvw/ { + g/def/ -/^/+#10 i/|/ + g/uvw/ +/$/-#10 i/|/ +} diff --git a/sam/addresses/first-last.cmd b/sam/addresses/first-last.cmd @@ -0,0 +1,4 @@ +0/Emacs/,$-/Emacs/ { + i/>>/ + a/<</ +} diff --git a/sam/addresses/first-last.in b/sam/addresses/first-last.in @@ -0,0 +1,4 @@ +This manual is organized in a rather haphazard manner. The first +several sections were written hastily in an attempt to provide a +general introduction to the commands in Emacs and to try to show +the method in the madness that is the Emacs command structure. diff --git a/sam/addresses/second.cmd b/sam/addresses/second.cmd @@ -0,0 +1,4 @@ +0/Emacs/+// { + i/>>/ + a/<</ +} diff --git a/sam/addresses/second.in b/sam/addresses/second.in @@ -0,0 +1,4 @@ +This manual is organized in a rather haphazard manner. The first +several sections were written hastily in an attempt to provide a +general introduction to the commands in Emacs and to try to show +the method in the madness that is the Emacs command structure. diff --git a/sam/commands/group.cmd b/sam/commands/group.cmd @@ -0,0 +1,5 @@ +,x/Emacs/ { + i/V/ + d + a/i/ +} diff --git a/sam/commands/group.in b/sam/commands/group.in @@ -0,0 +1 @@ +Emacs Emacs! diff --git a/sam/commands/long-text.cmd b/sam/commands/long-text.cmd @@ -0,0 +1,11 @@ +i +The +quick +brown +fox +jumps +over +the +lazy +dog +. diff --git a/sam/commands/long-text.in b/sam/commands/long-text.in diff --git a/sam/commands/pipe-out.cmd b/sam/commands/pipe-out.cmd @@ -0,0 +1,5 @@ +1 > cat > pipe-out.tmp +0 < cat pipe-out.tmp +0 r pipe-out.tmp +! rm pipe-out.tmp +0 < cat pipe-out.tmp diff --git a/sam/commands/pipe-out.in b/sam/commands/pipe-out.in @@ -0,0 +1 @@ +Hello World diff --git a/sam/commands/repeated-shell.cmd b/sam/commands/repeated-shell.cmd @@ -0,0 +1,2 @@ +1 | tr a-z A-Z +2 | diff --git a/sam/commands/repeated-shell.in b/sam/commands/repeated-shell.in @@ -0,0 +1,2 @@ +Hello +World diff --git a/sam/errors/conflict.cmd b/sam/errors/conflict.cmd @@ -0,0 +1,4 @@ +,{ +c/text1/ +c/text2/ +} diff --git a/sam/errors/conflict.in b/sam/errors/conflict.in @@ -0,0 +1 @@ +Hello World! diff --git a/sam/errors/filter.cmd b/sam/errors/filter.cmd @@ -0,0 +1 @@ +1 | tr a-z A-Z && false diff --git a/sam/errors/filter.in b/sam/errors/filter.in @@ -0,0 +1 @@ +Filter command failed diff --git a/sam/errors/filter.ref b/sam/errors/filter.ref @@ -0,0 +1 @@ +Filter command failed diff --git a/sam/errors/pipe-in.cmd b/sam/errors/pipe-in.cmd @@ -0,0 +1 @@ +1 < echo FAILED && false diff --git a/sam/errors/pipe-in.in b/sam/errors/pipe-in.in @@ -0,0 +1 @@ +Pipe in command failed diff --git a/sam/errors/pipe-in.ref b/sam/errors/pipe-in.ref @@ -0,0 +1 @@ +Pipe in command failed diff --git a/sam/errors/read.cmd b/sam/errors/read.cmd @@ -0,0 +1 @@ +1 r not-found diff --git a/sam/errors/read.in b/sam/errors/read.in @@ -0,0 +1 @@ +Read non-existing file diff --git a/sam/errors/unbalanced-group.cmd b/sam/errors/unbalanced-group.cmd @@ -0,0 +1,5 @@ +{ + i/>/ + { + a/</ +} diff --git a/sam/errors/unbalanced-group.in b/sam/errors/unbalanced-group.in @@ -0,0 +1 @@ +Unbalanced brace in group