aboutsummaryrefslogtreecommitdiffstats
path: root/tests/deccra.sh
blob: c8e9079ff5892fbe31fbca5bbeed421b41abac16 (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
#!/bin/sh

# move to 0; 0
printf '\033[H'
# fill in left space
for _ in $(seq 0 23); do
    for _ in $(seq 0 3); do
        printf '\033[0;1m\'
        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
    for _ in $(seq 0 3); do
        printf '\033[0m          '
    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'

# copy one char
printf '\033[3;3;3;3;;2;48;\044v'

# Copy rectangle
printf '\033[5;5;9;9;;8;45;\044v'

# invalid rectangles
printf '\033[5;5;4;9;;8;45;\044v'
printf '\033[5;5;9;4;;8;45;\044v'


# Copy rectangle with invalid page values
printf '\033[5;5;9;9;1337;14;55;1337\044v'

# Copy to part clipped
printf '\033[5;5;9;9;;22;78;\044v'

# Copy upon itself (full overlap)
printf '\033[5;5;9;9;;5;5;\044v'

# Copy upon itself (some overlap on the right)
printf '\033[5;5;9;9;;7;7;\044v'

# Copy upon itself (some overlap on the left)
printf '\033[15;5;19;9;;17;3;\044v'


# WITH MARGINS ENFORCED

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

# restrict cursor
printf '\033[?6h'

printf '\033[5;21;9;25;;1;50;\044v'
# Copy rectangle to on margins
printf '\033[5;21;9;25;;6;54;\044v'