* Re: [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources in regex-tests [not found] ` <20160802160534.8844E2201A4@vcs.savannah.gnu.org> @ 2016-08-03 0:32 ` Ken Brown 2016-08-03 2:36 ` Michal Nazarewicz 0 siblings, 1 reply; 4+ messages in thread From: Ken Brown @ 2016-08-03 0:32 UTC (permalink / raw) To: emacs-devel, Michal Nazarewicz On 8/2/2016 12:05 PM, Michal Nazarewicz wrote: > branch: master > commit 82a487d522106c1c5afb00f2fa6c9055e37ba5ad > Author: Michal Nazarewicz <mina86@mina86.com> > Commit: Michal Nazarewicz <mina86@mina86.com> > > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources in regex-tests 2016-08-03 0:32 ` [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources in regex-tests Ken Brown @ 2016-08-03 2:36 ` Michal Nazarewicz 2016-08-03 2:40 ` Michal Nazarewicz 0 siblings, 1 reply; 4+ messages in thread From: Michal Nazarewicz @ 2016-08-03 2:36 UTC (permalink / raw) To: Ken Brown, emacs-devel 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 <mina86@mina86.com> >> Commit: Michal Nazarewicz <mina86@mina86.com> >> >> 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» ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources in regex-tests 2016-08-03 2:36 ` Michal Nazarewicz @ 2016-08-03 2:40 ` Michal Nazarewicz 2016-08-03 16:25 ` Ken Brown 0 siblings, 1 reply; 4+ messages in thread From: Michal Nazarewicz @ 2016-08-03 2:40 UTC (permalink / raw) To: Ken Brown, emacs-devel On Wed, Aug 03 2016, Michal Nazarewicz wrote: > 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 <mina86@mina86.com> >>> Commit: Michal Nazarewicz <mina86@mina86.com> >>> >>> 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: By which I of course meant: diff --git a/test/src/regex-tests.el b/test/src/regex-tests.el index 898548d..85addca 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» ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources in regex-tests 2016-08-03 2:40 ` Michal Nazarewicz @ 2016-08-03 16:25 ` Ken Brown 0 siblings, 0 replies; 4+ messages in thread From: Ken Brown @ 2016-08-03 16:25 UTC (permalink / raw) To: Michal Nazarewicz, emacs-devel On 8/2/2016 10:40 PM, Michal Nazarewicz wrote: > On Wed, Aug 03 2016, Michal Nazarewicz wrote: >> 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 <mina86@mina86.com> >>>> Commit: Michal Nazarewicz <mina86@mina86.com> >>>> >>>> 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: > [...] Yes, thanks. Ken ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-03 16:25 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20160802160532.8569.48288@vcs.savannah.gnu.org> [not found] ` <20160802160534.8844E2201A4@vcs.savannah.gnu.org> 2016-08-03 0:32 ` [Emacs-diffs] master 82a487d 03/10: Fix reading of regex-resources in regex-tests Ken Brown 2016-08-03 2:36 ` Michal Nazarewicz 2016-08-03 2:40 ` Michal Nazarewicz 2016-08-03 16:25 ` Ken Brown
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).