diff --git a/tests/debugger/declarative/Mmakefile b/tests/debugger/declarative/Mmakefile index af8f13a1c..e9865487d 100644 --- a/tests/debugger/declarative/Mmakefile +++ b/tests/debugger/declarative/Mmakefile @@ -13,6 +13,7 @@ DECLARATIVE_PROGS= \ browse_arg \ catch \ comp_gen \ + confirm_abort \ deep_warning \ dependency \ dependency2 \ @@ -135,6 +136,9 @@ catch.out: catch catch.$(INP) comp_gen.out: comp_gen comp_gen.inp $(MDB) ./comp_gen < comp_gen.inp > comp_gen.out 2>&1 +confirm_abort.out: confirm_abort confirm_abort.inp + $(MDB) ./confirm_abort < confirm_abort.inp > confirm_abort.out 2>&1 + deep_warning.out: deep_warning deep_warning.inp $(MDB) ./deep_warning < deep_warning.inp > deep_warning.out 2>&1 diff --git a/tests/debugger/declarative/confirm_abort.exp b/tests/debugger/declarative/confirm_abort.exp new file mode 100644 index 000000000..1f22c390c --- /dev/null +++ b/tests/debugger/declarative/confirm_abort.exp @@ -0,0 +1,54 @@ + 1: 1 1 CALL pred confirm_abort:main/2-0 (det) confirm_abort.m:7 +mdb> echo on +Command echo enabled. +mdb> register --quiet +mdb> break p + 0: + stop interface pred confirm_abort:p/1-0 (det) +mdb> continue + 2: 2 2 CALL pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8) +mdb> finish + 5: 2 2 EXIT pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8) +mdb> dd +p(27) +Valid? no +q(27) +Valid? no +Found incorrect contour: +q(27) +Is this a bug? help +Answer one of: + y yes confirm that the suspect is a bug + n no do not accept that the suspect is a bug + a abort abort this diagnosis session and return to mdb + h, ? help this help message +Found incorrect contour: +q(27) +Is this a bug? h +Answer one of: + y yes confirm that the suspect is a bug + n no do not accept that the suspect is a bug + a abort abort this diagnosis session and return to mdb + h, ? help this help message +Found incorrect contour: +q(27) +Is this a bug? ? +Answer one of: + y yes confirm that the suspect is a bug + n no do not accept that the suspect is a bug + a abort abort this diagnosis session and return to mdb + h, ? help this help message +Found incorrect contour: +q(27) +Is this a bug? abort + 5: 2 2 EXIT pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8) +mdb> dd +Found incorrect contour: +q(27) +Is this a bug? a + 5: 2 2 EXIT pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8) +mdb> dd +Found incorrect contour: +q(27) +Is this a bug? y + 4: 3 3 EXIT pred confirm_abort:q/1-0 (det) confirm_abort.m:19 (confirm_abort.m:15) +mdb> quit -y diff --git a/tests/debugger/declarative/confirm_abort.inp b/tests/debugger/declarative/confirm_abort.inp new file mode 100644 index 000000000..dceb52e55 --- /dev/null +++ b/tests/debugger/declarative/confirm_abort.inp @@ -0,0 +1,17 @@ +echo on +register --quiet +break p +continue +finish +dd +no +no +help +h +? +abort +dd +a +dd +y +quit -y diff --git a/tests/debugger/declarative/confirm_abort.m b/tests/debugger/declarative/confirm_abort.m new file mode 100644 index 000000000..d17171b90 --- /dev/null +++ b/tests/debugger/declarative/confirm_abort.m @@ -0,0 +1,20 @@ +:- module confirm_abort. +:- interface. +:- import_module io. +:- pred main(io__state::di, io__state::uo) is det. +:- implementation. + +main --> + { p(X) }, + io__write_int(X), + io__nl. + +:- pred p(int::out) is det. + +p(N) :- + q(N). + +:- pred q(int::out) is det. + +q(27). +