emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 70ead82 184/215: Correct "breakpoint deleted" regexp


From: Rocky Bernstein
Subject: [elpa] master 70ead82 184/215: Correct "breakpoint deleted" regexp
Date: Sat, 30 Jul 2016 14:49:04 +0000 (UTC)

branch: master
commit 70ead82eccdcadcf5b6dcb2d7b0d955533048051
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Correct "breakpoint deleted" regexp
    
    test-regexp-zshdb.el: beef up and sync to corresponding bashdb test.
    Makefile.am: make "make check-short" in this directory work
---
 realgud/lang/posix-shell.el |    2 +-
 test/Makefile.am            |    4 ++--
 test/test-regexp-bashdb.el  |    2 +-
 test/test-regexp-zshdb.el   |   48 +++++++++++++++++++++++++++++++------------
 4 files changed, 39 insertions(+), 17 deletions(-)

diff --git a/realgud/lang/posix-shell.el b/realgud/lang/posix-shell.el
index 54216c2..6fff596 100644
--- a/realgud/lang/posix-shell.el
+++ b/realgud/lang/posix-shell.el
@@ -103,7 +103,7 @@ traceback) line."  )
 ;;   Removed 1 breakpoint(s).
 (defconst realgud:POSIX-debugger-brkpt-del-pat
   (make-realgud-loc-pat
-   :regexp (format "^Removed %s breakpoint(s).\n"
+   :regexp (format "^Deleted breakpoint %s.?\n"
                   realgud:regexp-captured-num)
    :num 1))
 
diff --git a/test/Makefile.am b/test/Makefile.am
index c0e7ede..c56f333 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -50,11 +50,11 @@ check-elget: $(EL_GET_CHECK_FILES)
 
 #: Run all tests with minimum verbosity
 check-short:
-       $(MAKE) check 2>&1  | ruby ../make-check-filter.rb
+       $(MAKE) check 2>&1  | ruby make-check-filter.rb
 
 #: Run all tests with minimum verbosity via el-get
 check-short-elget:
-       $(MAKE) check-elget 2>&1  | ruby ../make-check-filter.rb
+       $(MAKE) check-elget 2>&1  | ruby make-check-filter.rb
 
 test-%.run:
        (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash 
--load $(@:.run=.el))
diff --git a/test/test-regexp-bashdb.el b/test/test-regexp-bashdb.el
index 00830e9..35da88d 100644
--- a/test/test-regexp-bashdb.el
+++ b/test/test-regexp-bashdb.el
@@ -104,7 +104,7 @@
                         (match-end file-group)))
 
 (note "breakpoint delete matching")
-(setq test-text "Removed 1 breakpoint(s).\n")
+(setq test-text "Deleted breakpoint 1\n")
 (assert-t (numberp (loc-match test-text bp-del-pat)) "breakpoint delete 
matching")
 
 
diff --git a/test/test-regexp-zshdb.el b/test/test-regexp-zshdb.el
index c9ff95a..654d2ef 100644
--- a/test/test-regexp-zshdb.el
+++ b/test/test-regexp-zshdb.el
@@ -7,6 +7,24 @@
 
 (test-simple-start)
 
+(eval-when-compile
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar test-pos)
+  (defvar prompt-pat)
+  (defvar realgud:zshdb-pat-hash)
+  (defvar realgud-pat-bt)
+  (defvar test-s1)
+  (defvar test-text)
+  (defvar brkpt-del)
+  (defvar bp-del-pat)
+)
+
+(set (make-local-variable 'bp-del-pat)
+      (gethash "brkpt-del" realgud:zshdb-pat-hash))
+
 (setq prompt-pat (gethash "prompt"             realgud:zshdb-pat-hash))
 (setq frame-pat  (gethash "debugger-backtrace" realgud:zshdb-pat-hash))
 
@@ -18,7 +36,7 @@
 (note "zshdb frame matching")
 
 (note "debugger-backtrace")
-(setq s1
+(setq test-s1
       "->0 in file `/etc/apparmor/functions' at line 24
 ##1 /etc/apparmor/functions called from file `/etc/init.d/apparmor' at line 35
 ##2 /etc/init.d/apparmor called from file `/usr/local/bin/zshdb' at line 129
@@ -27,44 +45,48 @@
 (setq num-group (realgud-loc-pat-num frame-pat))
 (setq file-group (realgud-loc-pat-file-group frame-pat))
 (setq line-group (realgud-loc-pat-line-group frame-pat))
-(assert-equal 0 (string-match frame-re s1))
-(assert-equal "0" (substring s1
+(assert-equal 0 (string-match frame-re test-s1))
+(assert-equal "0" (substring test-s1
                             (match-beginning num-group)
                             (match-end num-group)))
 (assert-equal "/etc/apparmor/functions"
-             (substring s1
+             (substring test-s1
                         (match-beginning file-group)
                         (match-end file-group)))
 (assert-equal "24"
-             (substring s1
+             (substring test-s1
                         (match-beginning line-group)
                         (match-end line-group)))
 (setq pos (match-end 0))
 
-(assert-equal 49 (string-match frame-re s1 pos))
-(assert-equal "1" (substring s1
+(assert-equal 49 (string-match frame-re test-s1 pos))
+(assert-equal "1" (substring test-s1
                             (match-beginning num-group)
                             (match-end num-group)))
 (assert-equal "/etc/init.d/apparmor"
-             (substring s1
+             (substring test-s1
                         (match-beginning file-group)
                         (match-end file-group)))
 (assert-equal "35"
-             (substring s1
+             (substring test-s1
                         (match-beginning line-group)
                         (match-end line-group)))
 (setq pos (match-end 0))
-(assert-equal 128 (string-match frame-re s1 pos))
-(assert-equal "2" (substring s1
+(assert-equal 128 (string-match frame-re test-s1 pos))
+(assert-equal "2" (substring test-s1
                             (match-beginning num-group)
                             (match-end num-group)))
 (assert-equal "/usr/local/bin/zshdb"
-             (substring s1
+             (substring test-s1
                         (match-beginning file-group)
                         (match-end file-group)))
 (assert-equal "129"
-             (substring s1
+             (substring test-s1
                         (match-beginning line-group)
                         (match-end line-group)))
 
+(note "breakpoint delete matching")
+(setq test-text "Deleted breakpoint 1\n")
+(assert-t (numberp (loc-match test-text bp-del-pat)) "breakpoint delete 
matching")
+
 (end-tests)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]