From 2afa91649868e865cd573c149f255acb8379c82f Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 3 Nov 2014 01:50:44 +0000 Subject: Fix sampler function --- test/tests.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/tests.el') diff --git a/test/tests.el b/test/tests.el index e097244..11914bb 100644 --- a/test/tests.el +++ b/test/tests.el @@ -6,9 +6,12 @@ (unintern symbol))))) ;;; Tests +(defvar stack-test-data-dir + (expand-file-name "data-samples/") + "") (defun stack-test-sample-data (method &optional directory) - (let ((file (concat "data-samples/" + (let ((file (concat stack-test-data-dir (when directory (concat directory "/")) method ".el"))) (when (file-exists-p file) -- cgit v1.2.3 From ffef03c69affa3b247785654c4c2856100044b1e Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 3 Nov 2014 13:37:07 +0000 Subject: Fix test sample. --- stack-question-list.el | 2 +- test/tests.el | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'test/tests.el') diff --git a/stack-question-list.el b/stack-question-list.el index bc8ad90..8f3f722 100644 --- a/stack-question-list.el +++ b/stack-question-list.el @@ -138,7 +138,7 @@ Letters do not insert themselves; instead, they are commands. If REDISPLAY is non-nil, also call `tabulated-list-print'." (interactive '(t)) ;; Obviously this needs to be changed. - (let ((question-list (stack-test-sample-data "questions"))) + (let ((question-list (stack-test-sample-data "questions" "test"))) ;; Print the result. (setq tabulated-list-entries (mapcar #'stack-question-list--print-info question-list))) diff --git a/test/tests.el b/test/tests.el index 11914bb..efad2d0 100644 --- a/test/tests.el +++ b/test/tests.el @@ -6,13 +6,12 @@ (unintern symbol))))) ;;; Tests -(defvar stack-test-data-dir - (expand-file-name "data-samples/") +(defvar stack-test-data-dir "data-samples/" "") (defun stack-test-sample-data (method &optional directory) - (let ((file (concat stack-test-data-dir - (when directory (concat directory "/")) + (let ((file (concat (when directory (concat directory "/")) + stack-test-data-dir method ".el"))) (when (file-exists-p file) (with-temp-buffer -- cgit v1.2.3