aboutsummaryrefslogtreecommitdiff
path: root/testsuite/ed.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/ed.tests')
-rwxr-xr-xtestsuite/ed.tests21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/ed.tests b/testsuite/ed.tests
new file mode 100755
index 000000000..475fdc244
--- /dev/null
+++ b/testsuite/ed.tests
@@ -0,0 +1,21 @@
1#!/bin/sh
2
3. ./testing.sh
4
5# testing "test name" "command" "expected result" "file input" "stdin"
6
7testing "ed insert text before current line" \
8 "ed input" "8\n1\ntext\n2\n3\n4\n13\n" "1\n2\n3\n4\n" '2i
9text
10.
11,p
12w
13q
14'
15
16testing "ed read text before current line" \
17 "ed input" "8\n8\n1\n2\n1\n2\n3\n4\n3\n4\n16\n" "1\n2\n3\n4\n" '2r input
18,p
19w
20q
21'