summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-10-04 17:45:37 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-10-04 17:45:37 -0400
commita27c1b72c5d444f591b179d89ab329faee4555b6 (patch)
tree06f42b309ca3590f0124929af1d13ed323a3b5fd /test
parent258ab3bc882036e9b3d85d73d1f22bc29f42f979 (diff)
downloademacs-a27c1b72c5d444f591b179d89ab329faee4555b6.tar.gz
* lisp/textmodes/css-mode.el (css-smie-rules): Toplevel's a list.
* test/automated/completion-tests.el: * test/indent/css-mode.css: New files. Fixes: debbugs:15467
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/completion-tests.el46
-rw-r--r--test/indent/css-mode.css3
3 files changed, 54 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 00a49eea936..b3bcdd9a5bd 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * automated/completion-tests.el:
+ * indent/css-mode.css: New files.
+
2013-10-03 Daiki Ueno <ueno@gnu.org>
* automated/data/package/signed/archive-contents:
diff --git a/test/automated/completion-tests.el b/test/automated/completion-tests.el
new file mode 100644
index 00000000000..9e54a00ddaf
--- /dev/null
+++ b/test/automated/completion-tests.el
@@ -0,0 +1,46 @@
+;;; completion-tests.el --- Tests for completion functions -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
+;; Keywords:
+
+;; 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.
+
+;; 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.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(eval-when-compile (require 'cl-lib))
+
+(ert-deftest completion-test1 ()
+ (with-temp-buffer
+ (cl-flet* ((test/completion-table (string pred action)
+ (if (eq action 'lambda)
+ nil
+ "test: "))
+ (test/completion-at-point ()
+ (list (copy-marker (point-min))
+ (copy-marker (point))
+ #'test/completion-table)))
+ (let ((completion-at-point-functions (list #'test/completion-at-point)))
+ (insert "TEST")
+ (completion-at-point)
+ (should (equal (buffer-string)
+ "test: "))))))
+
+(provide 'completion-tests)
+;;; completion-tests.el ends here
diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css
new file mode 100644
index 00000000000..f3787538460
--- /dev/null
+++ b/test/indent/css-mode.css
@@ -0,0 +1,3 @@
+.xxx
+{
+}