aboutsummaryrefslogtreecommitdiff
path: root/test/util.el
blob: 7d5937f2d5a3c3a63e1a060de3a044d36bd8a53c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
(defmacro stack-test-get-sample-data (method &optional directory)
  (with-current-buffer
      (find-file-noselect
       (concat "data-samples/"
	       (when directory (concat directory "/"))
	       method ".el"))
    (eval (read (buffer-string)))))

(setq stack-test-data-questions
      (stack-test-get-sample-data "questions")
      stack-test-data-sites
      (stack-test-get-sample-data "sites"))