[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 5da089b 332/346: tests: Replace #min-version with a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 5da089b 332/346: tests: Replace #min-version with a more generic #condition |
Date: |
Sun, 29 Aug 2021 11:00:55 -0400 (EDT) |
branch: elpa/d-mode
commit 5da089b07389a9901f33795b8ba7d87cd6d95f26
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
tests: Replace #min-version with a more generic #condition
This allows us to define more complex conditions, such as excluding a
specific Emacs version range.
---
d-mode-test.el | 8 +++-----
tests/I0019.d | 2 +-
tests/I0067.d | 2 +-
tests/I0082.d | 2 +-
tests/I0082.d.html | 2 +-
tests/I0093_35907724.d | 2 +-
tests/I0093_35907724.d.html | 2 +-
tests/fonts_params.d | 2 +-
tests/fonts_params.d.html | 2 +-
tests/imenu2.d | 2 +-
10 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index 222485a..529cba7 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -310,11 +310,9 @@ the reference file, raise an error."
(defun d-test-get-expected-result (filename)
(with-temp-buffer
(insert-file-contents filename)
- (let* ((min-ver
- (if (re-search-forward "^// #min-version: \\(.+\\)$" nil t)
- (match-string 1)
- "0")))
- (version<= min-ver emacs-version))))
+ (if (re-search-forward "^// #condition: \\(.+\\)$" nil t)
+ (eval (car (read-from-string (format "(progn %s)" (match-string 1)))))
+ t)))
(defmacro d-test-dir (dir)
"Register all test files from DIR with ert."
diff --git a/tests/I0019.d b/tests/I0019.d
index 37c058a..488ba1b 100644
--- a/tests/I0019.d
+++ b/tests/I0019.d
@@ -1,4 +1,4 @@
-// #min-version: 25.1
+// #condition: (version<= "25.1" emacs-version)
// #run: (d-test-indent)
enum OtherValues2 : uint {
diff --git a/tests/I0067.d b/tests/I0067.d
index 159ac92..2e7957b 100644
--- a/tests/I0067.d
+++ b/tests/I0067.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
// #run: (d-test-indent)
void foo(T)(T stuff)
diff --git a/tests/I0082.d b/tests/I0082.d
index b3d81eb..e19fe75 100644
--- a/tests/I0082.d
+++ b/tests/I0082.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
// #run: (d-test-fontification)
struct S
diff --git a/tests/I0082.d.html b/tests/I0082.d.html
index e2084b5..1d29328 100644
--- a/tests/I0082.d.html
+++ b/tests/I0082.d.html
@@ -1,4 +1,4 @@
-<span class="comment-delimiter">// </span><span class="comment">#min-version:
26.1
+<span class="comment-delimiter">// </span><span class="comment">#condition:
(version<= "26.1" emacs-version)
</span><span class="comment-delimiter">// </span><span class="comment">#run:
(d-test-fontification)
</span>
<span class="keyword">struct</span> <span class="type">S</span>
diff --git a/tests/I0093_35907724.d b/tests/I0093_35907724.d
index 96b1de3..72db0f2 100644
--- a/tests/I0093_35907724.d
+++ b/tests/I0093_35907724.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
// #run: (d-test-fontification)
foreach (const offset, const ref element; haystack) fun();
diff --git a/tests/I0093_35907724.d.html b/tests/I0093_35907724.d.html
index 7e5965a..8a76413 100644
--- a/tests/I0093_35907724.d.html
+++ b/tests/I0093_35907724.d.html
@@ -1,4 +1,4 @@
-<span class="comment-delimiter">// </span><span class="comment">#min-version:
26.1
+<span class="comment-delimiter">// </span><span class="comment">#condition:
(version<= "26.1" emacs-version)
</span><span class="comment-delimiter">// </span><span class="comment">#run:
(d-test-fontification)
</span>
<span class="keyword">foreach</span> (<span class="keyword">const</span> <span
class="variable-name">offset</span>, <span class="keyword">const ref</span>
<span class="variable-name">element</span>; haystack) fun();
diff --git a/tests/fonts_params.d b/tests/fonts_params.d
index 578ce38..34de32b 100644
--- a/tests/fonts_params.d
+++ b/tests/fonts_params.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
// #run: (d-test-fontification)
auto dg = (Object a, Object b) {};
diff --git a/tests/fonts_params.d.html b/tests/fonts_params.d.html
index 447f8e1..d0ed92d 100644
--- a/tests/fonts_params.d.html
+++ b/tests/fonts_params.d.html
@@ -1,4 +1,4 @@
-<span class="comment-delimiter">// </span><span class="comment">#min-version:
26.1
+<span class="comment-delimiter">// </span><span class="comment">#condition:
(version<= "26.1" emacs-version)
</span><span class="comment-delimiter">// </span><span class="comment">#run:
(d-test-fontification)
</span>
<span class="keyword">auto</span> <span class="variable-name">dg</span> =
(<span class="type">Object</span> <span class="variable-name">a</span>, <span
class="type">Object</span> <span class="variable-name">b</span>) {};
diff --git a/tests/imenu2.d b/tests/imenu2.d
index 7607d68..a0421b6 100644
--- a/tests/imenu2.d
+++ b/tests/imenu2.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
// #run: (d-test-get-imenu-lines)
// #out: (5 6 13 18 20 24 28 33 37 40 42 46 49 50 51 52 54 56)
- [nongnu] elpa/d-mode c29b03d 302/346: .travis.yml: Remove redundant "compile" step, (continued)
- [nongnu] elpa/d-mode c29b03d 302/346: .travis.yml: Remove redundant "compile" step, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c8413d2 317/346: tests: Rename fonts_lambda_params to fonts_params, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4586b41 314/346: Fix mis-interpreting parts of some compound statements as lambdas, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e759406 324/346: tests: New testcase, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 50fef92 321/346: Enable Coveralls parallel builds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0522d1c 320/346: Bundle our own undercover.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode df9c8a1 322/346: Fontify types in casts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5190c1d 323/346: Fix fontification of parameters of lambdas inside expressions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode bc4864d 325/346: d-mode.el: Remove c-font-lock-declarations advice, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a233437 329/346: Add "version" to c-block-stmt-2-kwds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5da089b 332/346: tests: Replace #min-version with a more generic #condition,
ELPA Syncer <=
- [nongnu] elpa/d-mode 9f6a2b6 339/346: Handle c-forward-sexp error in d-around--c-get-fontification-context, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 54aca49 333/346: tests/I0021: Disable on Emacs >=27 for now, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 84bf8ab 262/346: Fix fontification of single-character package names, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 546cc28 230/346: Fix parsing of block-less conditional declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 447515f 327/346: Merge pull request #93 from CyberShadow/next, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 75cc636 334/346: tests/fonts_auto: Remove final */, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b90a717 342/346: Merge pull request #106 from CyberShadow/pull-20210119-160250, ELPA Syncer, 2021/08/29