patch 8.0.1510: cannot test if a command causes a beep

Problem:    Cannot test if a command causes a beep.
Solution:   Add assert_beeps().
diff --git a/src/misc1.c b/src/misc1.c
index 821869a..e639fbe 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -3688,6 +3688,10 @@
 vim_beep(
     unsigned val) /* one of the BO_ values, e.g., BO_OPER */
 {
+#ifdef FEAT_EVAL
+    called_vim_beep = TRUE;
+#endif
+
     if (emsg_silent == 0)
     {
 	if (!((bo_flags & val) || (bo_flags & BO_ALL)))
@@ -3718,8 +3722,9 @@
 #endif
 	}
 
-	/* When 'verbose' is set and we are sourcing a script or executing a
-	 * function give the user a hint where the beep comes from. */
+	/* When 'debug' contains "beep" produce a message.  If we are sourcing
+	 * a script or executing a function give the user a hint where the beep
+	 * comes from. */
 	if (vim_strchr(p_debug, 'e') != NULL)
 	{
 	    msg_source(HL_ATTR(HLF_W));