aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/080.sh
blob: ed649dad8a3c909c3eb037aa076d80f612dcb3d0 (plain)
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
set -e

cat <<'EOF' > expected
44
44
46
46
44
42
42
EOF

bash ../../test_diff.sh <<'EOF'
int printf();

int main() {
    int a = 42;
    ++a;
    a++;
    printf("%d\n", a);
    printf("%d\n", a++);
    printf("%d\n", ++a);
    printf("%d\n", a);
    --a;
    a--;
    printf("%d\n", a--);
    printf("%d\n", --a);
    printf("%d\n", a);
}
EOF