Blame test/fcall_exit.awk

Packit 575503
#!/bin/awk -f
Packit 575503
Packit 575503
function crash () {
Packit 575503
    exit 1
Packit 575503
}
Packit 575503
Packit 575503
function true (a,b,c) {
Packit 575503
    return 0
Packit 575503
}
Packit 575503
Packit 575503
BEGIN {
Packit 575503
    if (ARGV[1] == 1) {
Packit 575503
        print "true(1, 1, crash()) => crash properly."
Packit 575503
        true(1, 1, crash())
Packit 575503
    } else if (ARGV[1] == 2) {
Packit 575503
        print "true(1, crash(), 1) => do not crash properly."
Packit 575503
        true(1, crash(),1)
Packit 575503
    } else {
Packit 575503
        print "true(1, crash()) => do not crash properly."
Packit 575503
        true(1, crash())
Packit 575503
    }
Packit 575503
}
Packit 575503
Packit 575503
# FdF