aboutsummaryrefslogtreecommitdiffstats
path: root/tests/decic-decdc.sh
blob: 9c4ddf82d0e97efcb6bfd131db64c2a872aa51ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/sh

# move to 0; 0
printf '\033[H'
# fill space
PL=0
for _ in $(seq 0 23); do
    PL=$((PL+1))
    if [ $PL -ge 9 ] ; then
        PL=0
    fi
    for _ in $(seq 1 $PL); do
        printf '#'
    done
    PR=$((10 - PL))
    for _ in $(seq 0 6); do
        printf '\033[0;1m\-'
        printf '\033[0;46;1;4m/'
        printf '\033[0;46;1;4m|'
        printf '\033[0;1;4;7m\\'
        printf '\033[0m~'
        printf '\033[0;1m_'
        printf '\033[0;31;7m>'
        printf '\033[0;31;4;7m^'
        printf '\033[0;1;7m<'
    done
    printf '\033[0m'
    for _ in $(seq 1 $PR); do
        printf '#'
    done
done

# move to 0; 0
printf '\033[H'

#set color
printf '\033[43;32;3m'

# set top/bottom margins:
printf '\033[3;20r'
# allow left/right margins
printf '\033[?69h'
# set left/right margins:
printf '\033[5;75s'


#
# INSERT
#

# move to
printf '\033[2;2H'
# insert column, outside margin, do nothing
printf '\033[\047}'
# move to
printf '\033[2;8H'
# insert column, outside margin, do nothing
printf '\033[\047}'
# move to
printf '\033[5;2H'
# insert column, outside margin, do nothing
printf '\033[\047}'


# move to
printf '\033[10;12H'
# insert column
printf '\033[\047}'

# move to
printf '\033[10;17H'
# insert 0 column (but 1 actually)
printf '\033[0\047}'

# move to
printf '\033[10;21H'
# insert 3 columns
printf '\033[3\047}'


#
# DELETE
#

# move to
printf '\033[2;78H'
# insert column, outside margin, do nothing
printf '\033[\047~'
# move to
printf '\033[10;78H'
# insert column, outside margin, do nothing
printf '\033[\047~'
# move to
printf '\033[2;60H'
# insert column, outside margin, do nothing
printf '\033[\047~'

# move to
printf '\033[10;50H'
# delete column
printf '\033[\047~'

# move to
printf '\033[10;55H'
# delete 0 column (but 1 actually)
printf '\033[0\047~'

# move to
printf '\033[10;60H'
# delete 3 columns
printf '\033[3\047~'