aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Dmitry Kurochkin <dmitry.kurochkin@gmail.com>2011-06-28 08:45:04 +0400
committerGravatar Carl Worth <cworth@cworth.org>2011-06-28 15:06:47 -0700
commitdd7572392145ed00f938e276d38d2ab3a1427055 (patch)
tree8e94ef4af6e1fbee4dd1061fe8178c97d38b6681 /test
parent5806c471de1d3893d94fb15ba3a0f4faaaa29ffa (diff)
test: cleanup test_emacs
Move auxiliary function definition and configuration from command line to test-lib.el.
Diffstat (limited to 'test')
-rw-r--r--test/test-lib.el8
-rwxr-xr-xtest/test-lib.sh9
2 files changed, 9 insertions, 8 deletions
diff --git a/test/test-lib.el b/test/test-lib.el
index 94399962..344a02e8 100644
--- a/test/test-lib.el
+++ b/test/test-lib.el
@@ -20,6 +20,14 @@
;;
;; Authors: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
+;; avoid crazy 10-column default of --batch
+(set-frame-width (window-frame (get-buffer-window)) 80)
+
+(defun notmuch-test-wait ()
+ "Wait for process completion."
+ (while (get-buffer-process (current-buffer))
+ (sleep-for 0.1)))
+
(defun visible-buffer-string ()
"Same as `buffer-string', but excludes invisible text."
(visible-buffer-substring (point-min) (point-max)))
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 3ec388c8..5f619603 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -852,18 +852,11 @@ fi
# --directory Ensure that the local elisp sources are found
#
# --load Force loading of notmuch.el and test-lib.el
-#
-# notmuch-test-wait Function for tests to use to wait for process completion
-#
-# set-frame-width 80 columns (avoids crazy 10-column default of --batch)
emacs \$BATCH --no-init-file --no-site-file \
--directory ../../emacs --load notmuch.el \
--directory .. --load test-lib.el \
- --eval "(defun notmuch-test-wait ()
- (while (get-buffer-process (current-buffer))
- (sleep-for 0.1)))" \
- --eval "(progn (set-frame-width (window-frame (get-buffer-window)) 80) \$@)"
+ --eval "(progn \$@)"
EOF
chmod a+x ./run_emacs
./run_emacs "$@"