1 ;;; -*- lexical-binding: t; -*-
3 ;; This file is part of GCC.
5 ;; GCC is free software: you can redistribute it and/or modify it
6 ;; under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation, either version 3 of the License, or
8 ;; (at your option) any later version.
10 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
11 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 ;; License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with GCC. If not, see <https://www.gnu.org/licenses/>.
21 ;; $ emacs -batch -l mdcompact.el -l mdcompact-testsuite.el -f ert-run-tests-batch-and-exit
28 (defconst mdcompat-test-directory
(concat (file-name-directory
33 (defun mdcompat-test-run (f)
35 (insert-file-contents f
)
37 (let ((a (buffer-string))
39 (insert-file-contents (concat f
".out"))
41 (should (string= a b
)))))
43 (defmacro mdcompat-gen-tests
()
46 for f in
(directory-files mdcompat-test-directory t
"md$")
48 `(ert-deftest ,(intern (concat "mdcompat-test-"
49 (file-name-sans-extension
50 (file-name-nondirectory f
))))
52 (mdcompat-test-run ,f
)))))
56 ;;; mdcompact-testsuite.el ends here