]> code.delx.au - gnu-emacs-elpa/blobdiff - test/test-bashdb.el
DRY/fix debugger invocation code. This time, mostly for remake and gdb
[gnu-emacs-elpa] / test / test-bashdb.el
index 92b0c326104f40b92ec59409bcfa81fffa6b774c..5c33b63c9a64d7c2ab994fb0e765b19a0aef37d6 100644 (file)
@@ -1,5 +1,8 @@
 (require 'test-simple)
 (load-file "../realgud/debugger/bashdb/bashdb.el")
+(load-file "../realgud/common/core.el")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
 
 (eval-when-compile (defvar test:run-process-save))
 
@@ -18,7 +21,8 @@
    (format "%s %s %s %S" debugger-name script-filename cmd-args
           track-mode-func))
   (assert-equal "bashdb" debugger-name "debugger name gets passed")
-  (let ((expanded-name (expand-file-name "./gcd.sh")))
+  (let ((expanded-name
+        (realgud:expand-file-name-if-exists "./gcd.sh")))
     (assert-equal  expanded-name script-filename "file name check")
     (assert-equal (list "-l" (expand-file-name ".") expanded-name "3" "5")
                  (cdr cmd-args) "command args listified")
     ))
 
 (note "bashdb-parse-cmd-args")
-(assert-equal (list nil '("bashdb") (list (expand-file-name "foo")) nil)
+(assert-equal (list nil '("bashdb")
+                   (list (realgud:expand-file-name-if-exists "foo")) nil)
              (bashdb-parse-cmd-args '("bashdb" "foo")))
-(assert-equal (list nil '("bashdb") (list (expand-file-name "program.sh") "foo") nil)
+(assert-equal (list nil '("bashdb")
+                   (list (realgud:expand-file-name-if-exists "program.sh")
+                         "foo") nil)
              (bashdb-parse-cmd-args
               '("bashdb" "program.sh" "foo")))