diff options
Diffstat (limited to 'gdb-wrapper2/test.sh')
-rwxr-xr-x | gdb-wrapper2/test.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gdb-wrapper2/test.sh b/gdb-wrapper2/test.sh new file mode 100755 index 0000000..f5fea63 --- /dev/null +++ b/gdb-wrapper2/test.sh @@ -0,0 +1,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 + |