aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Colascione2014-03-23 00:36:26 -0700
committerDaniel Colascione2014-03-23 00:36:26 -0700
commit6ddc44225e743e2b2a0d5c192f50aefd7a4a915b (patch)
treecdd5a777e46741a6372df97ed4acc51126b42e93 /test
parent10e00bd5b43c277ab59f336966a4a3ed35678d40 (diff)
downloademacs-6ddc44225e743e2b2a0d5c192f50aefd7a4a915b.tar.gz
emacs-6ddc44225e743e2b2a0d5c192f50aefd7a4a915b.zip
Merge capitalized-words-mode and subword-mode
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog4
-rw-r--r--test/automated/subword-tests.el31
2 files changed, 35 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 1fe024a1286..026357771bf 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,9 @@
12014-03-23 Daniel Colascione <dancol@dancol.org> 12014-03-23 Daniel Colascione <dancol@dancol.org>
2 2
3 * automated/subword-tests.el (subword-tests2): More subword tests.
4
52014-03-23 Daniel Colascione <dancol@dancol.org>
6
3 * automated/cl-lib.el (cl-lib-keyword-names-versus-values): New 7 * automated/cl-lib.el (cl-lib-keyword-names-versus-values): New
4 test: correct parsing of keyword arguments. 8 test: correct parsing of keyword arguments.
5 9
diff --git a/test/automated/subword-tests.el b/test/automated/subword-tests.el
index 3b37bc84886..7c6c77d4cc9 100644
--- a/test/automated/subword-tests.el
+++ b/test/automated/subword-tests.el
@@ -46,5 +46,36 @@
46 (insert "^")) 46 (insert "^"))
47 (should (equal (buffer-string) str))))) 47 (should (equal (buffer-string) str)))))
48 48
49(ert-deftest subword-tests2 ()
50 "Test that motion in subword-mode stops at the right places."
51
52 (let* ((line "fooBarBAZ quXD g_TESTThingAbc word BLAH test")
53 (fwrd "* * * * * * * * * * * * *")
54 (bkwd "* * * * * * * * * * * * *"))
55
56 (with-temp-buffer
57 (subword-mode 1)
58 (insert line)
59
60 ;; Test forward motion.
61
62 (goto-char (point-min))
63 (let ((stops (make-string (length fwrd) ?\ )))
64 (while (progn
65 (aset stops (1- (point)) ?\*)
66 (not (eobp)))
67 (forward-word))
68 (should (equal stops fwrd)))
69
70 ;; Test backward motion.
71
72 (goto-char (point-max))
73 (let ((stops (make-string (length bkwd) ?\ )))
74 (while (progn
75 (aset stops (1- (point)) ?\*)
76 (not (bobp)))
77 (backward-word))
78 (should (equal stops bkwd))))))
79
49(provide 'subword-tests) 80(provide 'subword-tests)
50;;; subword-tests.el ends here 81;;; subword-tests.el ends here