From c59815c860a11948359e96ecc51d566bb5e5d8fb Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 25 Oct 2019 15:28:37 -0400 Subject: `assert_succeeds`&`assert_fails`: multisuccess fix These tactics now work correctly with multisuccess tactics by wrapping the tactic argument in `once`. Fixes #10965 --- test-suite/output/Tactics.out | 1 + test-suite/output/Tactics.v | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'test-suite') diff --git a/test-suite/output/Tactics.out b/test-suite/output/Tactics.out index 19c9fc4423..70427220ed 100644 --- a/test-suite/output/Tactics.out +++ b/test-suite/output/Tactics.out @@ -6,3 +6,4 @@ The command has indeed failed with message: H is already used. The command has indeed failed with message: H is already used. +a diff --git a/test-suite/output/Tactics.v b/test-suite/output/Tactics.v index fa12f09a46..96b6d652c9 100644 --- a/test-suite/output/Tactics.v +++ b/test-suite/output/Tactics.v @@ -22,3 +22,11 @@ intros H. Fail intros [H%myid ?]. Fail destruct 1 as [H%myid ?]. Abort. + + +(* Test that assert_succeeds only runs a tactic once *) +Ltac should_not_loop := idtac + should_not_loop. +Goal True. + assert_succeeds should_not_loop. + assert_succeeds (idtac "a" + idtac "b"). (* should only output "a" *) +Abort. -- cgit v1.2.3 From c9adfcd356f2563d7c4b3927669a8268f184ec24 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Sat, 26 Oct 2019 00:46:14 -0400 Subject: Fix #9114, assert_succeeds (exact I) solves goal --- test-suite/bugs/closed/bug_9114.v | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test-suite/bugs/closed/bug_9114.v (limited to 'test-suite') diff --git a/test-suite/bugs/closed/bug_9114.v b/test-suite/bugs/closed/bug_9114.v new file mode 100644 index 0000000000..2cf91c1c2b --- /dev/null +++ b/test-suite/bugs/closed/bug_9114.v @@ -0,0 +1,5 @@ +Goal True. + assert_succeeds (exact I). + idtac. + (* Error: No such goal. *) +Abort. -- cgit v1.2.3