aboutsummaryrefslogtreecommitdiff
path: root/test-suite/success/simpl.v
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/success/simpl.v')
-rw-r--r--test-suite/success/simpl.v19
1 files changed, 19 insertions, 0 deletions
diff --git a/test-suite/success/simpl.v b/test-suite/success/simpl.v
index 66a92ea411..29b91e3aef 100644
--- a/test-suite/success/simpl.v
+++ b/test-suite/success/simpl.v
@@ -69,6 +69,7 @@ Abort.
(* This is a compatibility test with a non evaluable reference, maybe
not to be kept for long *)
+
Goal 0+0=0.
simpl @eq.
Abort.
@@ -79,3 +80,21 @@ Goal 0+0 = 0.
simpl "+".
Fail set (_ + _).
Abort.
+
+(* Check occurrences *)
+
+Record box A := Box { unbox : A }.
+
+Goal unbox _ (unbox _ (unbox _ (Box _ (Box _ (Box _ True))))) =
+ unbox _ (unbox _ (unbox _ (Box _ (Box _ (Box _ True))))).
+simpl (unbox _ (unbox _ _)) at 1.
+match goal with |- True = unbox _ (unbox _ (unbox _ (Box _ (Box _ (Box _ True))))) => idtac end.
+Undo 2.
+Fail simpl (unbox _ (unbox _ _)) at 5.
+simpl (unbox _ (unbox _ _)) at 1 4.
+match goal with |- True = unbox _ (Box _ True) => idtac end.
+Undo 2.
+Fail simpl (unbox _ (unbox _ _)) at 3 4. (* Nested and even overlapping *)
+simpl (unbox _ (unbox _ _)) at 2 4.
+match goal with |- unbox _ (Box _ True) = unbox _ (Box _ True) => idtac end.
+Abort.