diff options
author | Thanos Apollo <[email protected]> | 2023-07-16 09:31:20 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-07-16 09:31:20 +0300 |
commit | 22468798c28f233758f58a3337d44bc6f6cf3259 (patch) | |
tree | d654abba8922d8390d7599ca0b89cef76de172c3 /test | |
parent | 53b79476d25aa0d67ea6026ab498f94a4ae77cd6 (diff) |
tests: Update & add test-package-lint
Diffstat (limited to 'test')
-rw-r--r-- | test/yeetube-tests.el | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/test/yeetube-tests.el b/test/yeetube-tests.el index 4c95516..a4b36a1 100644 --- a/test/yeetube-tests.el +++ b/test/yeetube-tests.el @@ -1,31 +1,21 @@ -;;; yeetube-tests.el --- tests for yeetube.el -*- lexical-binding: t; -*- - -;; Copyright (C) 2023 Thanos Apollo - -;; Author: Thanos Apollo <[email protected]> -;; Keywords: +;;; Code: +(load-file "../yeetube.el") -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +(setq package-archives '(("melpa" . "https://melpa.org/packages/") + ("elpa" . "https://elpa.gnu.org/packages/") + ("nongnu" . "https://elpa.nongnu.org/nongnu/"))) +(package-initialize) -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +(unless package-archive-contents + (package-refresh-contents)) -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <https://www.gnu.org/licenses/>. +(require 'ert) +(require 'yeetube) -;;; Commentary: -;; +(package-install 'package-lint) +(require 'package-lint) -;;; Code: -(require 'ert) -(load-file "../yeetube.el") -(require 'yeetube) (ert-deftest test-is-youtube? () (should (equal (yeetube-check-if-youtube "youtube.com") t)) @@ -37,6 +27,9 @@ (yeetube-change-download-audio-format "m4a") (should (equal yeetube-download-audio-format "m4a"))) +(ert-deftest test-package-lint () + (let ((package-lint-errors (package-lint-buffer (find-file-noselect "../yeetube.el")))) + (should (equal package-lint-errors nil)))) (ert-run-tests-batch-and-exit) |