aboutsummaryrefslogtreecommitdiff
path: root/sam
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-02 13:43:34 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-02 13:43:34 +0100
commit0a3fdd77894a02c63cc14592505a4dbaaeaf7af7 (patch)
treeee2505726fae7a1f039a37b8145f6c16ac0feba0 /sam
parent11754d3c6451288fc06d85fb2f6e85552336010e (diff)
downloadvis-0a3fdd77894a02c63cc14592505a4dbaaeaf7af7.tar.gz
vis-0a3fdd77894a02c63cc14592505a4dbaaeaf7af7.tar.xz
test/sam: add more tests
Diffstat (limited to 'sam')
-rw-r--r--sam/addresses/columns.cmd5
-rw-r--r--sam/addresses/first-last.cmd4
-rw-r--r--sam/addresses/first-last.in4
-rw-r--r--sam/addresses/second.cmd4
-rw-r--r--sam/addresses/second.in4
-rw-r--r--sam/commands/group.cmd5
-rw-r--r--sam/commands/group.in1
-rw-r--r--sam/commands/long-text.cmd11
-rw-r--r--sam/commands/long-text.in0
-rw-r--r--sam/commands/pipe-out.cmd5
-rw-r--r--sam/commands/pipe-out.in1
-rw-r--r--sam/commands/repeated-shell.cmd2
-rw-r--r--sam/commands/repeated-shell.in2
-rw-r--r--sam/errors/conflict.cmd4
-rw-r--r--sam/errors/conflict.in1
-rw-r--r--sam/errors/filter.cmd1
-rw-r--r--sam/errors/filter.in1
-rw-r--r--sam/errors/filter.ref1
-rw-r--r--sam/errors/pipe-in.cmd1
-rw-r--r--sam/errors/pipe-in.in1
-rw-r--r--sam/errors/pipe-in.ref1
-rw-r--r--sam/errors/read.cmd1
-rw-r--r--sam/errors/read.in1
-rw-r--r--sam/errors/unbalanced-group.cmd5
-rw-r--r--sam/errors/unbalanced-group.in1
25 files changed, 66 insertions, 1 deletions
diff --git a/sam/addresses/columns.cmd b/sam/addresses/columns.cmd
index 80110dc..b00f736 100644
--- 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
new file mode 100644
index 0000000..ff1d6fc
--- /dev/null
+++ 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
new file mode 100644
index 0000000..02d5652
--- /dev/null
+++ 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
new file mode 100644
index 0000000..525bfa1
--- /dev/null
+++ 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
new file mode 100644
index 0000000..02d5652
--- /dev/null
+++ 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
new file mode 100644
index 0000000..8d77ed3
--- /dev/null
+++ 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
new file mode 100644
index 0000000..203403a
--- /dev/null
+++ b/sam/commands/group.in
@@ -0,0 +1 @@
+Emacs Emacs!
diff --git a/sam/commands/long-text.cmd b/sam/commands/long-text.cmd
new file mode 100644
index 0000000..420cb30
--- /dev/null
+++ 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
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sam/commands/long-text.in
diff --git a/sam/commands/pipe-out.cmd b/sam/commands/pipe-out.cmd
new file mode 100644
index 0000000..2a23da1
--- /dev/null
+++ 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
new file mode 100644
index 0000000..557db03
--- /dev/null
+++ 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
new file mode 100644
index 0000000..643e1d1
--- /dev/null
+++ 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
new file mode 100644
index 0000000..f9264f7
--- /dev/null
+++ b/sam/commands/repeated-shell.in
@@ -0,0 +1,2 @@
+Hello
+World
diff --git a/sam/errors/conflict.cmd b/sam/errors/conflict.cmd
new file mode 100644
index 0000000..8397024
--- /dev/null
+++ 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
new file mode 100644
index 0000000..980a0d5
--- /dev/null
+++ b/sam/errors/conflict.in
@@ -0,0 +1 @@
+Hello World!
diff --git a/sam/errors/filter.cmd b/sam/errors/filter.cmd
new file mode 100644
index 0000000..e54b088
--- /dev/null
+++ 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
new file mode 100644
index 0000000..4afca5f
--- /dev/null
+++ b/sam/errors/filter.in
@@ -0,0 +1 @@
+Filter command failed
diff --git a/sam/errors/filter.ref b/sam/errors/filter.ref
new file mode 100644
index 0000000..4afca5f
--- /dev/null
+++ 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
new file mode 100644
index 0000000..033cefb
--- /dev/null
+++ 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
new file mode 100644
index 0000000..b130b9a
--- /dev/null
+++ 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
new file mode 100644
index 0000000..b130b9a
--- /dev/null
+++ 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
new file mode 100644
index 0000000..7685f9d
--- /dev/null
+++ b/sam/errors/read.cmd
@@ -0,0 +1 @@
+1 r not-found
diff --git a/sam/errors/read.in b/sam/errors/read.in
new file mode 100644
index 0000000..1b88518
--- /dev/null
+++ 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
new file mode 100644
index 0000000..0a8faf2
--- /dev/null
+++ 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
new file mode 100644
index 0000000..8708690
--- /dev/null
+++ b/sam/errors/unbalanced-group.in
@@ -0,0 +1 @@
+Unbalanced brace in group