• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3[ -f testing.sh ] && . testing.sh
4
5# setup
6cp $FILES/vi/ascii.txt in.txt
7cp $FILES/vi/dd_first.in cmd.txt
8cp $FILES/vi/ascii_dd_first.out out.txt
9
10toyonly testing "dd first line ascii" \
11  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
12
13# teardown
14rm in.txt cmd.txt out.txt
15
16# setup
17cp $FILES/vi/ascii.txt in.txt
18cp $FILES/vi/dd_last.in cmd.txt
19cp $FILES/vi/ascii_dd_last.out out.txt
20
21toyonly testing "dd last line ascii" \
22  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
23
24# teardown
25rm in.txt cmd.txt out.txt
26
27# setup
28cp $FILES/vi/ascii.txt in.txt
29cp $FILES/vi/dw_last.in cmd.txt
30cp $FILES/vi/ascii_dw_last.out out.txt
31
32toyonly testing "dw last line ascii" \
33  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
34
35# teardown
36rm in.txt cmd.txt out.txt
37
38# setup
39cp $FILES/vi/ascii.txt in.txt
40cp $FILES/vi/dw_first.in cmd.txt
41cp $FILES/vi/ascii_dw_first.out out.txt
42
43toyonly testing "dw first line ascii" \
44  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
45
46# teardown
47rm in.txt cmd.txt out.txt
48
49# setup
50cp $FILES/vi/ascii.txt in.txt
51cp $FILES/vi/D_first.in cmd.txt
52cp $FILES/vi/ascii_D_first.out out.txt
53
54toyonly testing "D first line ascii" \
55  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
56
57# teardown
58rm in.txt cmd.txt out.txt
59
60# setup
61cp $FILES/vi/ascii.txt in.txt
62cp $FILES/vi/D_last.in cmd.txt
63cp $FILES/vi/ascii_D_last.out out.txt
64
65toyonly testing "D last line ascii" \
66  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
67
68# teardown
69rm in.txt cmd.txt out.txt
70
71# setup
72cp $FILES/vi/ascii.txt in.txt
73cp $FILES/vi/yw_push.in cmd.txt
74cp $FILES/vi/ascii_yw_push.out out.txt
75
76toyonly testing "yw push ascii" \
77  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
78
79# teardown
80rm in.txt cmd.txt out.txt
81
82# setup
83cp $FILES/vi/ascii.txt in.txt
84cp $FILES/vi/insert_sof.in cmd.txt
85cp $FILES/vi/ascii_insert_sof.out out.txt
86
87toyonly testing "insert start of file ascii" \
88  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
89
90# teardown
91rm in.txt cmd.txt out.txt
92
93# setup
94cp $FILES/vi/ascii.txt in.txt
95cp $FILES/vi/insert_eof.in cmd.txt
96cp $FILES/vi/ascii_insert_eof.out out.txt
97
98toyonly testing "insert end of file ascii" \
99  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
100
101# teardown
102rm in.txt cmd.txt out.txt
103
104# setup
105cp $FILES/vi/ascii.txt in.txt
106cp $FILES/vi/insert_after_w.in cmd.txt
107cp $FILES/vi/ascii_insert_after_w.out out.txt
108
109toyonly testing "insert after first word ascii" \
110  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
111
112# teardown
113rm in.txt cmd.txt out.txt
114
115# setup
116cp $FILES/vi/ascii.txt in.txt
117cp $FILES/vi/insert_multi.in cmd.txt
118cp $FILES/vi/ascii_insert_multi.out out.txt
119
120toyonly testing "insert multiple times ascii" \
121  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
122
123# teardown
124rm in.txt cmd.txt out.txt
125
126# setup
127cp $FILES/vi/ascii.txt in.txt
128cp $FILES/vi/insert_multi_yy_push.in cmd.txt
129cp $FILES/vi/ascii_insert_multi_yy_push.out out.txt
130
131toyonly testing "insert multi yank move and push ascii" \
132  "vi -s cmd.txt in.txt 1>/dev/null 2>/dev/null && cmp in.txt out.txt && echo yes" "yes\n" "" ""
133
134# teardown
135rm in.txt cmd.txt out.txt
136
137