aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/014.sh
blob: ba32d1f06838f4336ba9edc8a154ef7b510fda99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
set -e

bash ../../test_exit_code.sh 66 <<'EOF'
int foo() {
    int i;
    int ret;
    i = 0;
    ret = 0;
    for (i = 0; i < 100; i = i + 1) {
        if (i == 12) {
            break;
        }
        ret = ret + i;
    }
    return ret;
}

int main() {
    return foo();
}
EOF