aboutsummaryrefslogtreecommitdiff
path: root/test/sam/commands
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2024-05-21 19:53:22 -0600
committerRandy Palamar <randy@rnpnr.xyz>2024-05-21 19:53:22 -0600
commitb7074021b7bfb0932b889b9560dd22df31cef818 (patch)
tree0295b18de8fb8ea5289cbda95675687ae06025ff /test/sam/commands
parentb7f8018a00be930e3f2b864949aec1f91291309c (diff)
parentefafa3c178268a4149fc3e432bc1174a013c16de (diff)
downloadvis-b7074021b7bfb0932b889b9560dd22df31cef818.tar.gz
vis-b7074021b7bfb0932b889b9560dd22df31cef818.tar.xz
Merge vis-tests into test directory
Going forward all tests should be submitted here directly.
Diffstat (limited to 'test/sam/commands')
-rw-r--r--test/sam/commands/filter-capitalize.cmd1
-rw-r--r--test/sam/commands/filter-capitalize.in1
-rw-r--r--test/sam/commands/group.cmd5
-rw-r--r--test/sam/commands/group.in1
-rw-r--r--test/sam/commands/long-text.cmd11
-rw-r--r--test/sam/commands/long-text.in0
-rw-r--r--test/sam/commands/loop-empty-match1.cmd4
-rw-r--r--test/sam/commands/loop-empty-match1.in1
-rw-r--r--test/sam/commands/loop-empty-match2.cmd4
-rw-r--r--test/sam/commands/loop-empty-match2.in1
-rw-r--r--test/sam/commands/loop-empty-match3.cmd4
-rw-r--r--test/sam/commands/loop-empty-match3.in1
-rw-r--r--test/sam/commands/loop-empty-match4.cmd4
-rw-r--r--test/sam/commands/loop-empty-match4.in1
-rw-r--r--test/sam/commands/loop-lines.in10
-rw-r--r--test/sam/commands/loop-lines1.cmd1
l---------test/sam/commands/loop-lines1.in1
-rw-r--r--test/sam/commands/loop-lines2.cmd1
l---------test/sam/commands/loop-lines2.in1
-rw-r--r--test/sam/commands/loop-lines3.cmd1
l---------test/sam/commands/loop-lines3.in1
-rw-r--r--test/sam/commands/loop-lines4.cmd1
l---------test/sam/commands/loop-lines4.in1
-rw-r--r--test/sam/commands/loop-lines5.cmd1
l---------test/sam/commands/loop-lines5.in1
-rw-r--r--test/sam/commands/loop-lines6.cmd1
l---------test/sam/commands/loop-lines6.in1
-rw-r--r--test/sam/commands/loop-lines7.cmd1
l---------test/sam/commands/loop-lines7.in1
-rw-r--r--test/sam/commands/loop-lines8.cmd1
l---------test/sam/commands/loop-lines8.in1
-rw-r--r--test/sam/commands/loop-lines9.cmd1
l---------test/sam/commands/loop-lines9.in1
-rw-r--r--test/sam/commands/pipe-in.cmd3
-rw-r--r--test/sam/commands/pipe-in.in10
-rw-r--r--test/sam/commands/pipe-out.cmd5
-rw-r--r--test/sam/commands/pipe-out.in1
-rw-r--r--test/sam/commands/repeated-shell.cmd2
-rw-r--r--test/sam/commands/repeated-shell.in2
-rw-r--r--test/sam/commands/unicode-replace.cmd1
-rw-r--r--test/sam/commands/unicode-replace.in5
41 files changed, 96 insertions, 0 deletions
diff --git a/test/sam/commands/filter-capitalize.cmd b/test/sam/commands/filter-capitalize.cmd
new file mode 100644
index 0000000..47e2a6f
--- /dev/null
+++ b/test/sam/commands/filter-capitalize.cmd
@@ -0,0 +1 @@
+,y/ / | tr a-z A-Z
diff --git a/test/sam/commands/filter-capitalize.in b/test/sam/commands/filter-capitalize.in
new file mode 100644
index 0000000..980a0d5
--- /dev/null
+++ b/test/sam/commands/filter-capitalize.in
@@ -0,0 +1 @@
+Hello World!
diff --git a/test/sam/commands/group.cmd b/test/sam/commands/group.cmd
new file mode 100644
index 0000000..8d77ed3
--- /dev/null
+++ b/test/sam/commands/group.cmd
@@ -0,0 +1,5 @@
+,x/Emacs/ {
+ i/V/
+ d
+ a/i/
+}
diff --git a/test/sam/commands/group.in b/test/sam/commands/group.in
new file mode 100644
index 0000000..203403a
--- /dev/null
+++ b/test/sam/commands/group.in
@@ -0,0 +1 @@
+Emacs Emacs!
diff --git a/test/sam/commands/long-text.cmd b/test/sam/commands/long-text.cmd
new file mode 100644
index 0000000..420cb30
--- /dev/null
+++ b/test/sam/commands/long-text.cmd
@@ -0,0 +1,11 @@
+i
+The
+quick
+brown
+fox
+jumps
+over
+the
+lazy
+dog
+.
diff --git a/test/sam/commands/long-text.in b/test/sam/commands/long-text.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sam/commands/long-text.in
diff --git a/test/sam/commands/loop-empty-match1.cmd b/test/sam/commands/loop-empty-match1.cmd
new file mode 100644
index 0000000..e4dbf1c
--- /dev/null
+++ b/test/sam/commands/loop-empty-match1.cmd
@@ -0,0 +1,4 @@
+,x/svissvis/ y/s/ {
+ i/[/
+ a/]/
+}
diff --git a/test/sam/commands/loop-empty-match1.in b/test/sam/commands/loop-empty-match1.in
new file mode 100644
index 0000000..3e0c636
--- /dev/null
+++ b/test/sam/commands/loop-empty-match1.in
@@ -0,0 +1 @@
+visvissvisvis
diff --git a/test/sam/commands/loop-empty-match2.cmd b/test/sam/commands/loop-empty-match2.cmd
new file mode 100644
index 0000000..ebc9c9d
--- /dev/null
+++ b/test/sam/commands/loop-empty-match2.cmd
@@ -0,0 +1,4 @@
+,x/svissvis/ x/[^s]*/ {
+ i/[/
+ a/]/
+}
diff --git a/test/sam/commands/loop-empty-match2.in b/test/sam/commands/loop-empty-match2.in
new file mode 100644
index 0000000..3e0c636
--- /dev/null
+++ b/test/sam/commands/loop-empty-match2.in
@@ -0,0 +1 @@
+visvissvisvis
diff --git a/test/sam/commands/loop-empty-match3.cmd b/test/sam/commands/loop-empty-match3.cmd
new file mode 100644
index 0000000..69c1ded
--- /dev/null
+++ b/test/sam/commands/loop-empty-match3.cmd
@@ -0,0 +1,4 @@
+,x/svissvis/ y/[a-z]/ {
+ i/[/
+ a/]/
+}
diff --git a/test/sam/commands/loop-empty-match3.in b/test/sam/commands/loop-empty-match3.in
new file mode 100644
index 0000000..3e0c636
--- /dev/null
+++ b/test/sam/commands/loop-empty-match3.in
@@ -0,0 +1 @@
+visvissvisvis
diff --git a/test/sam/commands/loop-empty-match4.cmd b/test/sam/commands/loop-empty-match4.cmd
new file mode 100644
index 0000000..4d4ffe8
--- /dev/null
+++ b/test/sam/commands/loop-empty-match4.cmd
@@ -0,0 +1,4 @@
+,x/svissvis/ x/[^a-z]/ {
+ i/[/
+ a/]/
+}
diff --git a/test/sam/commands/loop-empty-match4.in b/test/sam/commands/loop-empty-match4.in
new file mode 100644
index 0000000..3e0c636
--- /dev/null
+++ b/test/sam/commands/loop-empty-match4.in
@@ -0,0 +1 @@
+visvissvisvis
diff --git a/test/sam/commands/loop-lines.in b/test/sam/commands/loop-lines.in
new file mode 100644
index 0000000..f00c965
--- /dev/null
+++ b/test/sam/commands/loop-lines.in
@@ -0,0 +1,10 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
diff --git a/test/sam/commands/loop-lines1.cmd b/test/sam/commands/loop-lines1.cmd
new file mode 100644
index 0000000..f947289
--- /dev/null
+++ b/test/sam/commands/loop-lines1.cmd
@@ -0,0 +1 @@
+,x/^.*$/ a,\\,
diff --git a/test/sam/commands/loop-lines1.in b/test/sam/commands/loop-lines1.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines1.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines2.cmd b/test/sam/commands/loop-lines2.cmd
new file mode 100644
index 0000000..696aab4
--- /dev/null
+++ b/test/sam/commands/loop-lines2.cmd
@@ -0,0 +1 @@
+,x/^.*$/ i,//,
diff --git a/test/sam/commands/loop-lines2.in b/test/sam/commands/loop-lines2.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines2.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines3.cmd b/test/sam/commands/loop-lines3.cmd
new file mode 100644
index 0000000..9f16753
--- /dev/null
+++ b/test/sam/commands/loop-lines3.cmd
@@ -0,0 +1 @@
+,x/^/ c/#/
diff --git a/test/sam/commands/loop-lines3.in b/test/sam/commands/loop-lines3.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines3.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines4.cmd b/test/sam/commands/loop-lines4.cmd
new file mode 100644
index 0000000..4ce51bf
--- /dev/null
+++ b/test/sam/commands/loop-lines4.cmd
@@ -0,0 +1 @@
+,x/$/ c/#/
diff --git a/test/sam/commands/loop-lines4.in b/test/sam/commands/loop-lines4.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines4.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines5.cmd b/test/sam/commands/loop-lines5.cmd
new file mode 100644
index 0000000..45539d5
--- /dev/null
+++ b/test/sam/commands/loop-lines5.cmd
@@ -0,0 +1 @@
+,y/\n/ i/*/
diff --git a/test/sam/commands/loop-lines5.in b/test/sam/commands/loop-lines5.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines5.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines6.cmd b/test/sam/commands/loop-lines6.cmd
new file mode 100644
index 0000000..8204e7d
--- /dev/null
+++ b/test/sam/commands/loop-lines6.cmd
@@ -0,0 +1 @@
+,y/\n/ a/*/
diff --git a/test/sam/commands/loop-lines6.in b/test/sam/commands/loop-lines6.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines6.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines7.cmd b/test/sam/commands/loop-lines7.cmd
new file mode 100644
index 0000000..b948c78
--- /dev/null
+++ b/test/sam/commands/loop-lines7.cmd
@@ -0,0 +1 @@
+,x i/--/
diff --git a/test/sam/commands/loop-lines7.in b/test/sam/commands/loop-lines7.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines7.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines8.cmd b/test/sam/commands/loop-lines8.cmd
new file mode 100644
index 0000000..3cb435a
--- /dev/null
+++ b/test/sam/commands/loop-lines8.cmd
@@ -0,0 +1 @@
+,x a/--/
diff --git a/test/sam/commands/loop-lines8.in b/test/sam/commands/loop-lines8.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines8.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/loop-lines9.cmd b/test/sam/commands/loop-lines9.cmd
new file mode 100644
index 0000000..f5e6d4c
--- /dev/null
+++ b/test/sam/commands/loop-lines9.cmd
@@ -0,0 +1 @@
+,x/^.*\n/ i/#/
diff --git a/test/sam/commands/loop-lines9.in b/test/sam/commands/loop-lines9.in
new file mode 120000
index 0000000..0ad8301
--- /dev/null
+++ b/test/sam/commands/loop-lines9.in
@@ -0,0 +1 @@
+loop-lines.in \ No newline at end of file
diff --git a/test/sam/commands/pipe-in.cmd b/test/sam/commands/pipe-in.cmd
new file mode 100644
index 0000000..1a67edb
--- /dev/null
+++ b/test/sam/commands/pipe-in.cmd
@@ -0,0 +1,3 @@
+0 < echo Before first line
+1 < echo Replace first line
+$ < echo New Last line
diff --git a/test/sam/commands/pipe-in.in b/test/sam/commands/pipe-in.in
new file mode 100644
index 0000000..f00c965
--- /dev/null
+++ b/test/sam/commands/pipe-in.in
@@ -0,0 +1,10 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
diff --git a/test/sam/commands/pipe-out.cmd b/test/sam/commands/pipe-out.cmd
new file mode 100644
index 0000000..2a23da1
--- /dev/null
+++ b/test/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/test/sam/commands/pipe-out.in b/test/sam/commands/pipe-out.in
new file mode 100644
index 0000000..557db03
--- /dev/null
+++ b/test/sam/commands/pipe-out.in
@@ -0,0 +1 @@
+Hello World
diff --git a/test/sam/commands/repeated-shell.cmd b/test/sam/commands/repeated-shell.cmd
new file mode 100644
index 0000000..643e1d1
--- /dev/null
+++ b/test/sam/commands/repeated-shell.cmd
@@ -0,0 +1,2 @@
+1 | tr a-z A-Z
+2 |
diff --git a/test/sam/commands/repeated-shell.in b/test/sam/commands/repeated-shell.in
new file mode 100644
index 0000000..f9264f7
--- /dev/null
+++ b/test/sam/commands/repeated-shell.in
@@ -0,0 +1,2 @@
+Hello
+World
diff --git a/test/sam/commands/unicode-replace.cmd b/test/sam/commands/unicode-replace.cmd
new file mode 100644
index 0000000..eb6cb82
--- /dev/null
+++ b/test/sam/commands/unicode-replace.cmd
@@ -0,0 +1 @@
+x/♪/ c/♫/
diff --git a/test/sam/commands/unicode-replace.in b/test/sam/commands/unicode-replace.in
new file mode 100644
index 0000000..2e7cca9
--- /dev/null
+++ b/test/sam/commands/unicode-replace.in
@@ -0,0 +1,5 @@
+♪
+♪♪
+♪♪♪
+♪♪
+♪