set test error-1
set prog_output "error: foo\nerror: evaluating index expression near line 1, column 15\nerror: called from `g'\nerror: called from `f'"
do_test error-1.m

set test error-2
set prog_output "error: foo"
do_test error-2.m

set test error-3
set prog_output "error: unspecified error"
do_test error-3.m

set test error-4
set prog_output "error: foo"
do_test error-4.m

set test warning-1
set prog_output "warning: foo"
do_test warning-1.m

set test warning-2
set prog_output "warning: unspecified warning"
do_test warning-2.m

set test warning-3
set prog_output "warning: foo"
do_test warning-3.m

set test usage-1
set prog_output "usage: foo\nerror: called from `g'\nerror: called from `f'"
do_test usage-1.m

set test usage-2
set prog_output "usage: foo"
do_test usage-2.m

set test usage-3
set prog_output "usage: unknown"
do_test usage-3.m

set test usage-4
set prog_output "usage: foo"
do_test usage-4.m

