#!/usr/bin/vipsi

// some tests for error conditions
//
// call with argument 1 for testcase 1 etc.


if count globals
	rename globals[1] = "testcase"
	testcase = eval testcase
else
	var testcase = 1
then


if testcase==1
	proc a(w) { if w a(w-1) else fsdfsfj then }
	a(5)

	log "this cannot happen",nl
	end
then


if testcase==2
	proc a(w) { if w a(w-1) else fsdfsfj then }
	proc b()  { a(2) }
	proc c()  { b()  }
	c()

	log "this cannot happen",nl
	end
then









log "testcase not recognized",nl
put "huhu",nl
log "testcase not recognized",nl
put #0,"stdin"
put #1,"stdout"
put #2,"stderr"
put nl

end











