[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources i
From: |
Michal Nazarewicz |
Subject: |
Re: [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources in regex-tests |
Date: |
Wed, 03 Aug 2016 04:36:47 +0200 |
User-agent: |
Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/25.1.50.1 (x86_64-unknown-linux-gnu) |
On Tue, Aug 02 2016, Ken Brown wrote:
> On 8/2/2016 12:05 PM, Michal Nazarewicz wrote:
>> branch: master
>> commit 82a487d522106c1c5afb00f2fa6c9055e37ba5ad
>> Author: Michal Nazarewicz <address@hidden>
>> Commit: Michal Nazarewicz <address@hidden>
>>
>> Fix reading of regex-resources in regex-tests
>>
>> * test/src/regex-tests.el (regex-tests-generic-line): Referring to
>> ‘buffer-file-name’ does not work when running the test from command
>> line, i.e. via make, which results in (wrong-type-argument stringp nil)
>> failures. Replace it with hard-coded path.
>
> Four of the tests now fail for an out-of-tree build:
>
> FAILED regex-tests-BOOST
> FAILED regex-tests-PCRE
> FAILED regex-tests-PTESTS
> FAILED regex-tests-TESTS
>
> Ken
Does this fix this:
diff --git a/test/src/regex-tests.el b/test/src/regex-tests.el
index 898548d..c77168b 100644
--- a/test/src/regex-tests.el
+++ b/test/src/regex-tests.el
@@ -21,6 +21,11 @@
(require 'ert)
+(defvar regex-tests--resources-dir
+ (concat (concat (file-name-directory (or load-file-name buffer-file-name))
+ "/regex-resources/"))
+ "Path to regex-resources directory next to the \"regex-tests.el\" file.")
+
(ert-deftest regex-word-cc-fallback-test ()
"Test that ‘[[:cc:]]*x’ matches ‘x’ (bug#24020).
@@ -98,7 +103,7 @@ regex-tests-generic-line
`(with-temp-buffer
(modify-syntax-entry ?_ "w;; ") ; tests expect _ to be a word
- (insert-file-contents ,(concat "src/regex-resources/" test-file))
+ (insert-file-contents (concat regex-tests--resources-dir test-file))
(let ((case-fold-search nil)
(line-number 1)
(whitelist-idx 0))
--
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»