summaryrefslogtreecommitdiff
path: root/gdb-wrapper2/test.sh
blob: f5fea638bffa71b6bc6dc5b6438e4c67bccb3073 (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
31
32
#!/bin/bash

function do_test {
	../gdb-wrapper2.sh ./test_program --verbose "$@"
}

function title {
	tput bold
	tput setaf 3
	echo "$@"
	echo
	tput sgr0
}

title "Test: Raise 11."
do_test --raise 11

title "Test: Raise and catch 11."
do_test --raise 11 --catch 11

title "Test: Raise then keep recursively catching 11."
do_test --raise 11 --catch 11 --recursive

title "Test: Call Com_Error."
do_test --Com_Error

title "Test: Call Com_Error then keep recursively calling it."
do_test --Com_Error --recursive

title "Test: Raise but ignore 2."
do_test --raise 2 --ignore 2