aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGlenn Morris2020-05-16 10:29:14 -0700
committerGlenn Morris2020-05-16 10:29:14 -0700
commit788c2480f448e97773172f3e840976dbcdc3e6c8 (patch)
tree60d3425a657e682da7790fc5f0d2548995721ef2 /test
parenta67415a71a1be5419547ac5e2abe51bc6bb37f1d (diff)
parentb4937f64cd97ff6bf93538987c014f8ea8ff9d34 (diff)
downloademacs-788c2480f448e97773172f3e840976dbcdc3e6c8.tar.gz
emacs-788c2480f448e97773172f3e840976dbcdc3e6c8.zip
Merge from origin/emacs-27
b4937f64cd (origin/emacs-27) Improve documentation of manually instal... efd4e973a4 Reflect the emacs-devel ELPA/MELPA dispute in FAQ 28541674cd Consider face inheritance when checking region face backgr... e75f6be6cc Fix dired default file operation (bug#41261) 406fb0746c Fix documentation related to 'command-switch-alist'. 747e0a2523 Improve ediff readability in misterioso theme (Bug#41221) 48830c73e7 Fix a crash in handle_display_spec a37290a6f9 In x_hide_tip reset tip_last_frame for GTK+ tooltips only ... 3d81995692 Fix docstring of flymake-make-diagnostic (bug#40351) 632aa9d57a Go back to “Bahá’í” e2406ff60f * lisp/dired.el (dired-toggle-marks): Doc fix. (Bug#41097) # Conflicts: # doc/emacs/building.texi
Diffstat (limited to 'test')
-rw-r--r--test/lisp/startup-tests.el47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/lisp/startup-tests.el b/test/lisp/startup-tests.el
new file mode 100644
index 00000000000..314ffc93e4a
--- /dev/null
+++ b/test/lisp/startup-tests.el
@@ -0,0 +1,47 @@
1;;; startup-tests.el --- unit tests for startup.el -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2020 Free Software Foundation, Inc.
4
5;; Author: Philipp Stephani <phst@google.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;; Unit tests for startup.el.
25
26;;; Code:
27
28(ert-deftest startup-tests/command-switch-alist ()
29 (let* ((foo-args ()) (bar-args ())
30 (command-switch-alist
31 (list (cons "--foo"
32 (lambda (arg)
33 (ert-info ("Processing argument --foo")
34 (push arg foo-args)
35 (should (equal command-line-args-left
36 '("value" "--bar=value")))
37 (pop command-line-args-left))))
38 (cons "--bar=value"
39 (lambda (arg)
40 (ert-info ("Processing argument --bar")
41 (push arg bar-args)
42 (should-not command-line-args-left)))))))
43 (command-line-1 '("--foo" "value" "--bar=value"))
44 (should (equal foo-args '("--foo")))
45 (should (equal bar-args '("--bar=value")))))
46
47;;; startup-tests.el ends here