summaryrefslogtreecommitdiff
path: root/lisp/ldg-test.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-16 02:39:42 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-16 02:39:42 -0500
commit11067d9cc6593fd19cb44ecd3cd8c31b9b8b0f65 (patch)
treea2463a4aeb1126caee37457d9b0ff576de5c5fd0 /lisp/ldg-test.el
parent4da56023d060129c38a49c5bdcb52cd3cdc1dfc6 (diff)
downloadledger-11067d9cc6593fd19cb44ecd3cd8c31b9b8b0f65.tar.gz
ledger-11067d9cc6593fd19cb44ecd3cd8c31b9b8b0f65.tar.bz2
ledger-11067d9cc6593fd19cb44ecd3cd8c31b9b8b0f65.zip
Unexpected initial whitespace is an error (again)
Fixes #565
Diffstat (limited to 'lisp/ldg-test.el')
-rw-r--r--lisp/ldg-test.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ldg-test.el b/lisp/ldg-test.el
index 2ab7a0c6..ad612f4d 100644
--- a/lisp/ldg-test.el
+++ b/lisp/ldg-test.el
@@ -39,8 +39,11 @@
(setq output
(concat (or output "")
(buffer-substring beg (match-beginning 0)))))))
- (find-file-other-window (expand-file-name (concat prefix ".test")
- ledger-source-directory))
+ (find-file-other-window
+ (expand-file-name (concat prefix ".test")
+ (expand-file-name "test/regress"
+ ledger-source-directory)))
+ (ledger-mode)
(when input
(insert input))
(when output
@@ -52,9 +55,11 @@
(interactive)
(save-excursion
(goto-char (point-min))
- (when (re-search-forward "^test \\(.+\\)" nil t)
+ (when (re-search-forward "^test \\(.+?\\)\\( ->.*\\)?$" nil t)
(let ((command (expand-file-name ledger-test-binary))
(args (format "-f \"%s\" %s" buffer-file-name (match-string 1))))
+ (setq args (replace-regexp-in-string "\\$sourcepath"
+ ledger-source-directory args))
(kill-new args)
(message "Testing: ledger %s" args)
(async-shell-command (format "\"%s\" %s" command args))))))