[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 69eaa1a 080/459: Add tests for compilation-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 69eaa1a 080/459: Add tests for compilation-mode regexps. |
Date: |
Sun, 22 Aug 2021 13:59:01 -0400 (EDT) |
branch: externals/csharp-mode
commit 69eaa1a7f7d66dda295b5674bdf9ad398e632e76
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Add tests for compilation-mode regexps.
---
csharp-mode-tests.el | 18 +++++++++++++++++-
test-files/msbuild-error.txt | 2 +-
test-files/msbuild-warning.txt | 2 +-
test-files/xbuild-error.txt | 2 +-
test-files/xbuild-warning.txt | 2 +-
5 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 0662b6f..2021732 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -10,7 +10,7 @@
(defun get-current-line-contents ()
(let* ((start)
- (end))
+ (end))
(move-beginning-of-line 1)
(setq start (point))
(move-end-of-line 1)
@@ -49,5 +49,21 @@
(should
(equal buffer1 buffer2)))))
+(ert-deftest build-warnings-and-errors-are-parsed ()
+ (dolist (test-case
+ `(("./test-files/msbuild-warning.txt"
,csharp-compilation-re-msbuild-warning 3)
+ ("./test-files/msbuild-error.txt"
,csharp-compilation-re-msbuild-error 1)
+ ("./test-files/xbuild-warning.txt"
,csharp-compilation-re-xbuild-warning 5)
+ ("./test-files/xbuild-error.txt"
,csharp-compilation-re-xbuild-error 1)
+ ))
+
+ (let* ((file-name (car test-case))
+ (regexp (cadr test-case))
+ (times (caddr test-case))
+ (find-file-hook '()) ;; avoid vc-mode file-hooks when opening!
+ (buffer (find-file-read-only file-name)))
+ (dotimes (number times)
+ (re-search-forward regexp))
+ (kill-buffer buffer))))
;;(ert-run-tests-interactively t)
diff --git a/test-files/msbuild-error.txt b/test-files/msbuild-error.txt
index d1ea947..db60400 100644
--- a/test-files/msbuild-error.txt
+++ b/test-files/msbuild-error.txt
@@ -1,4 +1,4 @@
--*- mode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
+-*- xmode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
Compilation started at Sat Feb 21 10:26:47
"C:\Program Files (x86)\MSBuild\12.0\Bin\Msbuild.exe"
diff --git a/test-files/msbuild-warning.txt b/test-files/msbuild-warning.txt
index 0f46911..2411806 100644
--- a/test-files/msbuild-warning.txt
+++ b/test-files/msbuild-warning.txt
@@ -1,4 +1,4 @@
--*- mode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
+-*- xmode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
Compilation started at Sat Feb 21 10:24:14
"C:\Program Files (x86)\MSBuild\12.0\Bin\Msbuild.exe"
diff --git a/test-files/xbuild-error.txt b/test-files/xbuild-error.txt
index ed14e16..77a366e 100644
--- a/test-files/xbuild-error.txt
+++ b/test-files/xbuild-error.txt
@@ -1,4 +1,4 @@
--*- mode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
+-*- xmode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
Compilation started at Fri Feb 20 22:52:43
xbuild /p:GenerateFullPaths=true
diff --git a/test-files/xbuild-warning.txt b/test-files/xbuild-warning.txt
index cc466ea..5a77ba2 100644
--- a/test-files/xbuild-warning.txt
+++ b/test-files/xbuild-warning.txt
@@ -1,4 +1,4 @@
--*- mode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
+-*- xmode: compilation; default-directory:
"~/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/" -*-
Compilation started at Fri Feb 20 22:55:05
xbuild /p:GenerateFullPaths=true
- [elpa] externals/csharp-mode 64eb7db 114/459: Merge pull request #47 from josteink/feature-cl-lib, (continued)
- [elpa] externals/csharp-mode 64eb7db 114/459: Merge pull request #47 from josteink/feature-cl-lib, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 165a128 028/459: Update maintainer-ship and new repo-URL., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ac6a1ff 036/459: Don't package stuff we only need for the build., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f000c97 037/459: Add link to Travis., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0762f78 038/459: remove the debug (message "Loading ...") forms, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 49d213a 045/459: Remove csharp-insert-open-brace. Recommend electric-pair-mode instead., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3af278a 070/459: Parse the base directory from MSBuild to support finding errors in dependency projects., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e73ad4e 071/459: Merge pull request #30 from binki/compilation-regexps, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode baef28a 072/459: fix error highlighting and use filename functions, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2303fe0 074/459: Add msbuild and xbuild log-files for ERT-testing., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 69eaa1a 080/459: Add tests for compilation-mode regexps.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 7ef0c5c 032/459: Configure travis-build., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2fe1a72 033/459: Fix error in path in makefile., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3d0f86b 043/459: Updated readme., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode fff8cb1 053/459: Merge branch 'devel', ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 689dd8b 056/459: make c# style the default style, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 421d3de 062/459: remove aspx code, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 962478e 057/459: Merge branch 'devel', ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2d13a9c 058/459: Add very broad build-level test., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 723341b 067/459: Fix incorrect-code tags in readme., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a86839b 064/459: Merged from master., ELPA Syncer, 2021/08/22